We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
React version: 8.3.0
Each child in a list should have a unique "key" prop.
Link to code example:
No link needed, it's a single line of code:
<ul>{ [1,2,3].map(num => <li key="sameKey">{num}</li> }</ul>
The warning essentially says "You've got duplicate values". But, React knows exactly what key it saw duplicated, right?
That key (eg. "sameKey" in my example), would be useful for debugging purposes, so why not report it?
"sameKey"
Each child in a list should have a unique "key" prop, but the key "sameKey" was seen at least twice.
The text was updated successfully, but these errors were encountered:
Here try to pass the sameKey as num as each num is different. Now you won't get any warnings
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
React version: 8.3.0
Steps To Reproduce
Link to code example:
No link needed, it's a single line of code:
The current behavior
The expected behavior
The warning essentially says "You've got duplicate values". But, React knows exactly what key it saw duplicated, right?
That key (eg.
"sameKey"
in my example), would be useful for debugging purposes, so why not report it?The text was updated successfully, but these errors were encountered: