You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently cloneElement is not compatible with uppercase components because unlike in JavaScript, where the props are just a "bag of properties" modelled as a JS object, in server-reason-react a component function takes props as labelled arguments, so it's not possible to "inject" more of these labelled arguments at runtime.
Maybe server-reason-react should warn or show some error when cloneElement is used with uppercase components? Or even hard crash. Otherwise programs might behave in unexpected ways without devs noticing.
The text was updated successfully, but these errors were encountered:
Currently
cloneElement
is not compatible with uppercase components because unlike in JavaScript, where the props are just a "bag of properties" modelled as a JS object, in server-reason-react a component function takes props as labelled arguments, so it's not possible to "inject" more of these labelled arguments at runtime.Maybe server-reason-react should warn or show some error when
cloneElement
is used with uppercase components? Or even hard crash. Otherwise programs might behave in unexpected ways without devs noticing.The text was updated successfully, but these errors were encountered: