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
By internal react properties I mean ref and key. 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 the key, ref and props 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:
@wereHamster how would this translate into JSX, using the createElement does allow you to break things up but not sure how this would be achieved via JSX unless to passed the props as an attribute e.g. <Test ref='test' props={myProps} />
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: