AlexGilleran / jsx-control-statements

Neater If and For for React JSX
https://www.npmjs.com/package/babel-plugin-jsx-control-statements
MIT License
1.62k stars 64 forks source link

Undefined is not a function with new JSX transform with react 17 #99

Open romanlex opened 3 years ago

romanlex commented 3 years ago

I have a multiple errors when trying use several react nodes inside overwise or if block image

All work properly If I wrap this nodes to Fragment image

jailsonpaca commented 3 years ago

same happens to me!

jailsonpaca commented 3 years ago

I solve now with the as parent, I forgot to put as parent of

texttechne commented 3 years ago

I don't think this has anything to do with this library: It all depends on what you have as surrounding code. Are you directly returning the Choose block? Would it also work if you put the fragment around the Choose block?