-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[4.0.0.rc-9] Immutable renders a Map's key in React 16 #1430
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
I believe this is the same behavior in React 15 and Immutable 3.x Use {itemMap.valueSeq().map((item, index) => (
<Item key={index} item={item} />
)} |
The branch I'm working on used immutable 3.x and react 15 and didn't experience this issue. Only once I upgraded to React 16 did it occur. But I will try |
Hey Thanks It worked for me! @kentor |
I also have the same problem. |
had same problem here but fixed with kentor's advice. Btw does anyone know 'why' it happened? |
@s2s2kim It happened with the change over to React 16’s “Fiber” renderer. I suspect it is somehow related to the fundamental changes in rendering arrays and iterables that allows for For maintainers, note that this issue is solved and can be closed. |
Experienced this. Was surprised from where the dummy text was rendering from |
Hi, mapping on a Map will, effectively, return a new Map, and there has been a chance in the |
What happened
Updated a Repo to React 16 and discovered that iterating over a Map will render the return item && the key. I realize using Maps as children is experimental but thought you'd like to know. Not sure if this would be considered a react 16 bug.
What I expected:
Render the React element and ignore the key.
How to reproduce
will render something like
0 <Item /> 1 <Item /> 3 <Item />
The text was updated successfully, but these errors were encountered: