Estree Util Build Jsx
estree-util-build-jsx
Transform JSX in estrees to function calls (for react, preact, and most hyperscript interfaces)
Component Libraries
estree
ast
ecmascript
javascript
tree
jsx
xml
build
hyperscript
compile
Stars
756
Weekly
7.1M
Open issues
9
Bundle
~15 kB
Installation
npm install estree-util-build-jsxCode example
import { Button } from "estree-util-build-jsx";
export function Example() {
return (
<div className="flex gap-2">
<Button>Primary</Button>
<Button variant="outline">Secondary</Button>
</div>
);
}Pros & cons
Pros
- Actively maintained by Titus Wormer
- 7.1M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~15 kB to your bundle
- Not supported in React Native
- 9 open issues on GitHub