babel-plugin-jsx-adopt
babel-plugin-jsx-adopt copied to clipboard
Is this possible? I couldn't make it work ```jsx {(item, opened, toggle) => { ``` a possible solution could be ```jsx const [item, opened, toggle] = adopt() ```
This is a perfect use case for a babel-plugin-macros macro. Anyone interested in doing that?
```js const example = () => (theme = ) ``` this is likely broken because of https://github.com/Andarist/babel-plugin-jsx-adopt/blob/c76850888c7fa4d4f04eb8b178f9ff2fa8f418c5/src/index.js#L143 `stmt` will be found in outer function (the one containing `example`), logic should...
Not sure how to do it properly, but at the moment `React.cloneElement` is used and this should be: - avoided - or configured