-
Notifications
You must be signed in to change notification settings - Fork 48.6k
Unexpected string key handling #2612
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
Comments
@sebmarkbage what do you want to do here? react/src/utils/traverseAllChildren.js Line 112 in bb97482
|
I think the issue is actually here yeah? react/src/utils/traverseAllChildren.js Line 48 in bb97482
Should probably be changed to
|
Nice catch. I think that we might actually have more of these flaws. We should be more careful as this prevents browsers to add @spicyj that if branch can be separated and we just use the implicit key for string/number. |
I came across this one because I'd extended
String.prototype.key
with a custom key generator. React ends up treating the function itself as the child key, so it hides any strings that come after it.http://jsfiddle.net/u2b6dac8/2/
Object key handling is documented and makes sense. Not sure it makes sense to handle string keys this way.
http://facebook.github.io/react/docs/multiple-components.html
The text was updated successfully, but these errors were encountered: