-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
"Shorthand fragment syntax does support providing keys" when it does not #2365
Comments
It does, afaik - the purpose of fragment syntax is to avoid the need for a key on the children, not on the fragment itself. |
Ok, then how do we use it? < key={1}></> does not work. To clarify my question, the shorthand fragment syntax in my understanding is <></> while the regular syntax is |
hmm, that is a good point. #2316 added this; cc @kaykayehnn - it does seem like perhaps the error message has a typo, because there’s no tests with shorthand syntax and a key. |
Whoops, this is a typo - shorthand fragment syntax does not support providing keys. Passing keys to fragments is only supported with the regular syntax: I'll make a PR to fix this and update the docs. |
Wonderful! Thanks a lot for your effort - This plugin is mindblowing! 💙 |
error Missing "key" prop for element in iterator. Shorthand fragment syntax does support providing keys
It says the shorthand fragment syntax does support keys, but I think it does not support it, or does it?
Asking if this is a typo.
The text was updated successfully, but these errors were encountered: