-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Add feature flag for removing children Map support #17990
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 89c6274:
|
Details of bundled changes.Comparing: df134d3...89c6274 react
React: size: 0.0%, gzip: 0.0% Size changes (stable) |
Update flags Update flags
65ea5d3
to
89c6274
Compare
Details of bundled changes.Comparing: df134d3...89c6274 react
React: size: 0.0%, gzip: 0.0% Size changes (experimental) |
@@ -158,14 +159,22 @@ function traverseAllChildrenImpl( | |||
} else { | |||
const iteratorFn = getIteratorFn(children); | |||
if (typeof iteratorFn === 'function') { | |||
if (__DEV__) { | |||
if (iteratorFn === children.entries) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this diff, this check runs for everyone even outside of DEV. Can we move it inside the condition?
This adds a flag to disables support for Map as children (resulting in an invariant instead) and updates the existing warning.