Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloneElement should show some runtime error with uppercase components #143

Open
jchavarri opened this issue Jul 16, 2024 · 0 comments
Open

Comments

@jchavarri
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant