Skip to content

Conversation

@acdlite
Copy link
Collaborator

@acdlite acdlite commented Feb 6, 2017

We were already warning so this can go in the next major release.

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (if it passes)

if (iteratorFn) {
var iterator = iteratorFn.call(children);
var step;
if (iteratorFn !== children.entries) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should still warn in the case iteratorFn !== children.entries in case we want to have this back? People shouldn't use maps where the key is implicitly another child. Could create strange bugs.

The entries of a map are a two-element array of [key, value], which
React will treat as fragments with children. This is unlikely to ever
be the intended behavior, so we warn.
@acdlite acdlite force-pushed the removemapsaschildren branch from 1b8d7db to 14962f8 Compare February 7, 2017 01:07
@acdlite acdlite merged commit 2c7c783 into facebook:master Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants