Given the following
```js
a = <F new/>
```
We used to generate:
```js
a = React.createElement(F, {"new": true})
```
but now we generate
```js
a = React.createElement(F, {new: true})
```
If you need to quote these (ie for ES3 you can use
transform-property-literals)
@babel/helper-builder-react-jsx
Usage
type ElementState = {
tagExpr: Object; // tag node
tagName: string; // raw string tag name
args: Array<Object>; // array of call arguments
call?: Object; // optional call property that can be set to override the call expression returned
};
require("@babel/helper-builder-react-jsx")({
filter: function (element: JSXElement) {
// if returns false, the element isn't transformed
},
pre: function (state: ElementState) {
// function called with (state: ElementState) before building attribs
},
post: function (state: ElementState) {
// function called with (state: ElementState) after building attribs
},
compat?: boolean // true if React is in compat mode
});