-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Split out internal react properties from the user supplied props #2656
Comments
@wereHamster how would this translate into JSX, using the |
I agree with @chrislaughlin, supporting the use of those two props as valid user-defined props would be detrimental to anyone using JSX (since there is currently no way of specifying them). For this reason, we probably aren't going to support it in the near future. Feel free to continue the discussion on this thread, and we can re-open if our thinking on this matter changes substantially. |
By internal react properties I mean
ref
andkey
. The current API design forces users to mix those two into a single object. This is unfortunate in the case that the user wants to have props with the same name.The
ReactElement
solves that problem nicely because it takes thekey
,ref
andprops
as separate arguments. I understand that the current API is designed around a single props object, and the rest is treated as children. But I believe making explicit distinction between user supplied props and those used for internal purposes will lead to less confusion.The text was updated successfully, but these errors were encountered: