-
-
Notifications
You must be signed in to change notification settings - Fork 394
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
eslint-plugin-react(jsx-key) - false positive with missing key inside React.Children.toArray() #4421
Comments
Can I take this? |
Sure |
Hello folks! Is right to pass a non children array of elements to the The docs explicitly exposes that:
So I'm not sure if automatic calculation keys can work with non children array of elements. If anyone has some clue about it, let me know and I contribute to this issue! |
I have just tested this in the new oxlint 0.8.0 . There is still a minor tweak, that needs to be fixed.
|
My apologies, I didn't add an if statement to check for React.Children for fragments. Will open up another pull request. |
This triggers an error with oxlint:
But it does not with eslint. When using .map inside React.Children.toArray() a key should not be necessary (to my understanding)
The text was updated successfully, but these errors were encountered: