mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 00:20:28 +01:00
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)})
```
|
||
|---|---|---|
| .. | ||
| __tests__ | ||
| npm | ||
| src | ||
| index.js | ||
| package.json | ||
| README.md | ||
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.