react/packages/babel-plugin-react-jsx
Luna Ruan 3ac0eb075d
Modify Babel React JSX Duplicate Children Fix (#17101)
If a JSX element has both a children prop and children (ie. <div children={childOne}>{childTwo}</div>), IE throws an Multiple definitions of a property not allowed in strict mode. This modifies the previous fix (which used an Object.assign) by making the duplicate children a sequence expression on the next prop/child instead so that ordering is preserved. For example:

```
<Component children={useA()} foo={useB()} children={useC()}>{useD()}</Component>
```
should compile to
```
React.jsx(Component, {foo: (useA(), useB()), children: (useC(), useD)})
```
2019-10-15 17:13:21 -07:00
..
__tests__ Modify Babel React JSX Duplicate Children Fix (#17101) 2019-10-15 17:13:21 -07:00
npm Babel Transform JSX to React.jsx/React.jsxDEV Plugin (#16432) 2019-08-27 16:00:20 -07:00
src Modify Babel React JSX Duplicate Children Fix (#17101) 2019-10-15 17:13:21 -07:00
index.js Babel Transform JSX to React.jsx/React.jsxDEV Plugin (#16432) 2019-08-27 16:00:20 -07:00
package.json Babel Transform JSX to React.jsx/React.jsxDEV Plugin (#16432) 2019-08-27 16:00:20 -07:00
README.md Babel Transform JSX to React.jsx/React.jsxDEV Plugin (#16432) 2019-08-27 16:00:20 -07:00

This package is intended to eventually replace the current @babel/plugin-transform-react-jsx, changing the JSX transform from targeting React.createElement(type, props, children) to React.jsx(types, props, key).

https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md

This is experimental and not intended to be used directly.