-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix: no-array-index-key not working in React.Children methods #2085
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
Conversation
Fixes the case where you are iterating over a children prop via the React.Children API.
- Uses pragma context instead of 'React' - Adds back spaces I removed which increase readability
@ljharb I've addressed your CR comments, please read through again and let me know if there is anything else you need me to change! 💪👌🤙 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We’ll probably want to move the method to utils later, but this lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nice change.
The
no-array-index-key
was not flagging any errors when iterating viaReact.Children
methods. This fixes that!Fixes #2083