Skip to content
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

Merged
merged 1 commit into from
Feb 6, 2020

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Feb 6, 2020

This adds a flag to disables support for Map as children (resulting in an invariant instead) and updates the existing warning.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 6, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 6, 2020

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:

Sandbox Source
xenodochial-resonance-piogf Configuration

@sizebot
Copy link

sizebot commented Feb 6, 2020

Details of bundled changes.

Comparing: df134d3...89c6274

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react.development.js +0.3% +0.3% 114.29 KB 114.63 KB 29.25 KB 29.34 KB UMD_DEV
react.production.min.js 0.0% 0.0% 12.33 KB 12.33 KB 4.84 KB 4.84 KB UMD_PROD
react.profiling.min.js 0.0% 0.0% 15.85 KB 15.85 KB 5.95 KB 5.95 KB UMD_PROFILING
react.development.js +0.5% +0.2% 73.8 KB 74.14 KB 19.59 KB 19.63 KB NODE_DEV
react.production.min.js 0.0% 🔺+0.1% 6.54 KB 6.54 KB 2.72 KB 2.72 KB NODE_PROD

React: size: 0.0%, gzip: 0.0%

Size changes (stable)

Generated by 🚫 dangerJS against 89c6274

@trueadm trueadm force-pushed the remove-map-children-support branch from 65ea5d3 to 89c6274 Compare February 6, 2020 13:04
@sizebot
Copy link

sizebot commented Feb 6, 2020

Details of bundled changes.

Comparing: df134d3...89c6274

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react.development.js +0.3% +0.3% 114.31 KB 114.66 KB 29.25 KB 29.34 KB UMD_DEV
react.production.min.js 0.0% 0.0% 12.67 KB 12.67 KB 4.94 KB 4.95 KB UMD_PROD
React-prod.js 🔺+1.5% 🔺+0.4% 17.91 KB 18.19 KB 4.68 KB 4.7 KB FB_WWW_PROD
React-profiling.js +1.5% +0.4% 17.91 KB 18.19 KB 4.68 KB 4.7 KB FB_WWW_PROFILING
react.profiling.min.js 0.0% 0.0% 16.2 KB 16.2 KB 6.05 KB 6.05 KB UMD_PROFILING
react.development.js +0.5% +0.2% 73.83 KB 74.17 KB 19.6 KB 19.64 KB NODE_DEV
react.production.min.js 0.0% 0.0% 6.96 KB 6.96 KB 2.86 KB 2.86 KB NODE_PROD
React-dev.js +0.5% +0.4% 73.72 KB 74.09 KB 18.76 KB 18.83 KB FB_WWW_DEV

React: size: 0.0%, gzip: 0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against 89c6274

@trueadm trueadm merged commit 256d78d into facebook:master Feb 6, 2020
@trueadm trueadm deleted the remove-map-children-support branch February 6, 2020 13:19
@@ -158,14 +159,22 @@ function traverseAllChildrenImpl(
} else {
const iteratorFn = getIteratorFn(children);
if (typeof iteratorFn === 'function') {
if (__DEV__) {
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.

After this diff, this check runs for everyone even outside of DEV. Can we move it inside the condition?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants