reasonml / reason-react

Reason bindings for ReactJS
https://reasonml.github.io/reason-react/
MIT License
3.25k stars 347 forks source link

support jsx transform with fragment #835

Closed tatchi closed 3 months ago

tatchi commented 3 months ago

This is my attempt at fixing https://github.com/reasonml/reason-react/issues/834

anmonteiro commented 3 months ago

Thank you! This is a great catch.

I was wondering whether < key=... > </> was possible but it looks like it isn't: https://react.dev/reference/react/Fragment#caveats

anmonteiro commented 3 months ago

I fixed the transformation. in the jsx runtime, children need to be passed in the props object as {children: ...}