Skip to content

[react-core] Add experimental React Scope component API #16587

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

Merged
merged 3 commits into from
Aug 29, 2019

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Aug 27, 2019

This PR adds an experimental React.unstable_createScope API for internal testing and usage only. This is to be used for testing with projects around handling focus management within React. In order to keep things small and sane for reivew this PR only has ReactDOM (client) support for now (other renderer support to follow).

@trueadm trueadm requested review from sebmarkbage and necolas August 27, 2019 16:43
@trueadm trueadm changed the title [react-core] Add experimental React Scope component [react-core] Add experimental React Scope component API Aug 27, 2019
@sizebot
Copy link

sizebot commented Aug 27, 2019

React: size: 🔺+0.2%, gzip: 🔺+0.1%

ReactDOM: size: 0.0%, gzip: -0.0%

Details of bundled changes.

Comparing: 0da7bd0...7ef438f

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react.development.js +0.3% +0.3% 118.24 KB 118.64 KB 29.92 KB 30 KB UMD_DEV
react.production.min.js 🔺+0.2% 🔺+0.1% 12.68 KB 12.71 KB 5.03 KB 5.04 KB UMD_PROD
react.profiling.min.js +0.2% +0.1% 16.08 KB 16.11 KB 6.04 KB 6.05 KB UMD_PROFILING
react.development.js +0.6% +0.4% 71.99 KB 72.39 KB 18.95 KB 19.02 KB NODE_DEV
react.production.min.js 🔺+0.4% 🔺+0.3% 6.66 KB 6.69 KB 2.77 KB 2.78 KB NODE_PROD
React-dev.js +0.5% +0.4% 69.86 KB 70.24 KB 17.99 KB 18.06 KB FB_WWW_DEV
React-prod.js 🔺+0.2% 🔺+0.1% 17.25 KB 17.29 KB 4.52 KB 4.52 KB FB_WWW_PROD
React-profiling.js +0.2% +0.1% 17.25 KB 17.29 KB 4.52 KB 4.52 KB FB_WWW_PROFILING

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js +0.7% +0.6% 650.62 KB 655.29 KB 142.02 KB 142.82 KB UMD_DEV
react-art.production.min.js 🔺+0.1% 🔺+0.1% 101.86 KB 101.93 KB 31.13 KB 31.17 KB UMD_PROD
react-art.development.js +0.8% +0.6% 581.49 KB 586.17 KB 124.62 KB 125.43 KB NODE_DEV
react-art.production.min.js 🔺+0.1% 🔺+0.1% 66.87 KB 66.94 KB 20.38 KB 20.4 KB NODE_PROD
ReactART-dev.js +0.8% +0.6% 596.5 KB 601.22 KB 124.34 KB 125.14 KB FB_WWW_DEV
ReactART-prod.js 🔺+0.1% 🔺+0.1% 221.98 KB 222.15 KB 37.77 KB 37.79 KB FB_WWW_PROD

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.profiling.min.js +0.1% +0.1% 115.25 KB 115.32 KB 36.33 KB 36.36 KB NODE_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 140.9 KB 140.93 KB 36.96 KB 36.97 KB UMD_DEV
ReactDOM-dev.js +0.3% +0.1% 933.83 KB 936.29 KB 206.71 KB 207.02 KB FB_WWW_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 19.74 KB 19.74 KB 7.34 KB 7.34 KB UMD_PROD
react-dom-test-utils.development.js +0.1% 0.0% 57.22 KB 57.25 KB 15.78 KB 15.78 KB UMD_DEV
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.78 KB 3.78 KB 1.53 KB 1.53 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.2 KB 1.2 KB 699 B 701 B UMD_PROD
react-dom-test-utils.development.js +0.1% 0.0% 55.49 KB 55.52 KB 15.45 KB 15.45 KB NODE_DEV
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.61 KB 3.61 KB 1.48 KB 1.48 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 10.95 KB 10.95 KB 4.09 KB 4.09 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.2% 1.04 KB 1.04 KB 631 B 632 B NODE_PROD
react-dom.development.js +0.3% +0.2% 909.72 KB 912.17 KB 206.59 KB 206.92 KB UMD_DEV
react-dom.production.min.js 🔺+0.1% 🔺+0.1% 111.64 KB 111.71 KB 36.01 KB 36.03 KB UMD_PROD
react-dom.profiling.min.js +0.1% +0.1% 115.05 KB 115.12 KB 37.05 KB 37.07 KB UMD_PROFILING
react-dom.development.js +0.3% +0.1% 904.01 KB 906.46 KB 204.98 KB 205.27 KB NODE_DEV
react-dom-server.node.development.js 0.0% 0.0% 138.05 KB 138.08 KB 36.24 KB 36.25 KB NODE_DEV
react-dom.production.min.js 🔺+0.1% 0.0% 111.61 KB 111.68 KB 35.42 KB 35.43 KB NODE_PROD
ReactDOM-prod.js -0.5% -0.5% 369.71 KB 368.04 KB 67.8 KB 67.43 KB FB_WWW_PROD
ReactDOM-profiling.js -0.4% -0.6% 374.44 KB 372.76 KB 68.85 KB 68.47 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 137.03 KB 137.06 KB 36.02 KB 36.03 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 10.75 KB 10.75 KB 3.67 KB 3.68 KB UMD_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactTestRenderer-dev.js +0.8% +0.6% 607.58 KB 612.29 KB 126.76 KB 127.55 KB FB_WWW_DEV
react-test-renderer-shallow.production.min.js 0.0% -0.0% 11.41 KB 11.41 KB 3.53 KB 3.53 KB UMD_PROD
react-test-renderer-shallow.production.min.js 0.0% -0.1% 11.55 KB 11.55 KB 3.62 KB 3.62 KB NODE_PROD
react-test-renderer.development.js +0.8% +0.6% 594.65 KB 599.3 KB 127.33 KB 128.14 KB UMD_DEV
react-test-renderer.production.min.js 🔺+0.1% 🔺+0.1% 68.81 KB 68.87 KB 21.16 KB 21.18 KB UMD_PROD
react-test-renderer.development.js +0.8% +0.6% 590.19 KB 594.83 KB 126.19 KB 127 KB NODE_DEV
react-test-renderer.production.min.js 🔺+0.1% 🔺+0.1% 68.5 KB 68.56 KB 20.88 KB 20.89 KB NODE_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js +0.8% +0.7% 580.13 KB 584.81 KB 123.29 KB 124.13 KB NODE_DEV
react-reconciler.production.min.js 🔺+0.1% 🔺+0.1% 68.87 KB 68.94 KB 20.42 KB 20.44 KB NODE_PROD
react-reconciler-reflection.development.js +0.2% +0.1% 19.21 KB 19.25 KB 6.32 KB 6.33 KB NODE_DEV
react-reconciler-reflection.production.min.js 0.0% -0.1% 2.56 KB 2.56 KB 1.14 KB 1.14 KB NODE_PROD
react-reconciler-persistent.development.js +0.8% +0.7% 577.17 KB 581.82 KB 122.05 KB 122.87 KB NODE_DEV
react-reconciler-persistent.production.min.js 🔺+0.1% 🔺+0.1% 68.88 KB 68.95 KB 20.43 KB 20.45 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-prod.js 🔺+0.1% 0.0% 269.8 KB 269.99 KB 46.26 KB 46.28 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js +0.1% +0.1% 278.25 KB 278.4 KB 47.78 KB 47.8 KB RN_OSS_PROFILING
ReactFabric-prod.js 🔺+0.1% 0.0% 261.52 KB 261.69 KB 44.94 KB 44.95 KB RN_OSS_PROD
ReactFabric-profiling.js 0.0% 0.0% 270.32 KB 270.44 KB 46.45 KB 46.47 KB RN_OSS_PROFILING
ReactFabric-dev.js +0.6% +0.5% 735.71 KB 740.43 KB 155.84 KB 156.64 KB RN_FB_DEV
ReactFabric-prod.js 🔺+0.1% 0.0% 261.53 KB 261.7 KB 44.95 KB 44.96 KB RN_FB_PROD
ReactNativeRenderer-dev.js +0.6% +0.5% 729.16 KB 733.88 KB 154.68 KB 155.48 KB RN_OSS_DEV
ReactFabric-profiling.js 0.0% 0.0% 270.31 KB 270.44 KB 46.46 KB 46.48 KB RN_FB_PROFILING
ReactNativeRenderer-dev.js +0.6% +0.5% 729.32 KB 734.04 KB 154.76 KB 155.55 KB RN_FB_DEV
ReactNativeRenderer-prod.js 🔺+0.1% 0.0% 269.79 KB 269.99 KB 46.27 KB 46.29 KB RN_FB_PROD
ReactNativeRenderer-profiling.js +0.1% +0.1% 278.24 KB 278.39 KB 47.79 KB 47.81 KB RN_FB_PROFILING
ReactFabric-dev.js +0.6% +0.5% 735.54 KB 740.26 KB 155.77 KB 156.57 KB RN_OSS_DEV

Generated by 🚫 dangerJS

@trueadm trueadm requested a review from acdlite August 27, 2019 21:11
@sebmarkbage
Copy link
Collaborator

What's increasing the React bundle size? Some DCE that's changing or something?

@trueadm
Copy link
Contributor Author

trueadm commented Aug 27, 2019

@sebmarkbage The usage of the added ScopeComponent symbol in switch statements.

@trueadm trueadm merged commit bd79be9 into facebook:master Aug 29, 2019
@trueadm trueadm deleted the create-scope-experiment branch August 29, 2019 11:06
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.

5 participants