Skip to content
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

Best not to use index as key #15

Open
ZooeyMiller opened this issue May 25, 2018 · 0 comments
Open

Best not to use index as key #15

ZooeyMiller opened this issue May 25, 2018 · 0 comments
Assignees

Comments

@ZooeyMiller
Copy link

here you use the index as a key

You shouldn't use indices as keys in react as it messes with the diffing.

Kent C Dodds explains it better than I can: https://egghead.io/lessons/react-use-the-key-prop-when-rendering-a-list-with-react

(ping me on gitter if you need the fac egghead login)

@iPhatty iPhatty self-assigned this May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants