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

Mark root as already hydrated after committing #16739

Merged
merged 2 commits into from
Sep 11, 2019

Conversation

sebmarkbage
Copy link
Collaborator

I pulled this out of #16725.

We currently infer that a root is eligible for hydration if it has no children. The current === null check is just for Flow. A root will never render with no current because it comes into existence as a current with no children and then the first render is an update to that.

This fixes that by setting root.hydrate to false after committing the first time. I also need this commit phase for event replaying anyway.

@sizebot
Copy link

sizebot commented Sep 10, 2019

Details of bundled changes.

Comparing: ba6bb0f...6acafc3

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js +0.1% 0.0% 658.71 KB 659.23 KB 143.32 KB 143.39 KB UMD_DEV
react-art.production.min.js 0.0% 0.0% 102.02 KB 102.02 KB 31.18 KB 31.18 KB UMD_PROD
react-art.development.js +0.1% +0.1% 589.39 KB 589.91 KB 125.87 KB 125.94 KB NODE_DEV
react-art.production.min.js 0.0% 0.0% 67.02 KB 67.02 KB 20.38 KB 20.38 KB NODE_PROD
ReactART-dev.js +0.1% 0.0% 604.8 KB 605.24 KB 125.64 KB 125.7 KB FB_WWW_DEV
ReactART-prod.js 0.0% 0.0% 226 KB 226 KB 38.54 KB 38.54 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.0% 0.0% 115.82 KB 115.83 KB 36.52 KB 36.52 KB NODE_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 142.1 KB 142.1 KB 37.12 KB 37.12 KB UMD_DEV
ReactDOM-dev.js 0.0% 0.0% 946.04 KB 946.48 KB 208.85 KB 208.91 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% 0.0% 57.46 KB 57.46 KB 15.82 KB 15.82 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-test-utils.production.min.js 0.0% 0.0% 11.19 KB 11.19 KB 4.16 KB 4.16 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.1% 1.2 KB 1.2 KB 699 B 700 B UMD_PROD
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.96 KB 10.96 KB 4.09 KB 4.09 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.04 KB 1.04 KB 630 B 632 B NODE_PROD
react-dom.development.js +0.1% 0.0% 921.71 KB 922.23 KB 208.28 KB 208.35 KB UMD_DEV
react-dom.production.min.js 0.0% 0.0% 112.25 KB 112.27 KB 36.22 KB 36.24 KB UMD_PROD
react-dom.profiling.min.js 0.0% -0.1% 115.65 KB 115.66 KB 37.2 KB 37.17 KB UMD_PROFILING
react-dom.development.js +0.1% 0.0% 915.81 KB 916.32 KB 206.68 KB 206.74 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 112.18 KB 112.2 KB 35.56 KB 35.56 KB NODE_PROD
ReactDOM-prod.js 0.0% 0.0% 374.83 KB 374.84 KB 68.54 KB 68.57 KB FB_WWW_PROD
ReactDOM-profiling.js 0.0% 0.0% 380.31 KB 380.32 KB 69.59 KB 69.59 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 138.04 KB 138.04 KB 36.11 KB 36.11 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.73 KB 19.73 KB 7.34 KB 7.34 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.71 KB 60.71 KB 15.84 KB 15.84 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.75 KB 10.75 KB 3.67 KB 3.67 KB UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.39 KB 60.39 KB 15.72 KB 15.72 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 3.87 KB 3.87 KB 1.51 KB 1.51 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 10.49 KB 10.49 KB 3.57 KB 3.57 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.2% 1.1 KB 1.1 KB 665 B 666 B NODE_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactTestRenderer-dev.js +0.1% +0.1% 615.82 KB 616.26 KB 128.04 KB 128.1 KB FB_WWW_DEV
react-test-renderer-shallow.development.js 0.0% -0.0% 39.21 KB 39.21 KB 9.95 KB 9.95 KB UMD_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.development.js 0.0% 0.0% 33.18 KB 33.18 KB 8.49 KB 8.49 KB NODE_DEV
react-test-renderer-shallow.production.min.js 0.0% 0.0% 11.55 KB 11.55 KB 3.62 KB 3.62 KB NODE_PROD
react-test-renderer.development.js +0.1% +0.1% 602.74 KB 603.25 KB 128.65 KB 128.71 KB UMD_DEV
react-test-renderer.production.min.js 0.0% 0.0% 68.96 KB 68.96 KB 21.16 KB 21.17 KB UMD_PROD
react-test-renderer.development.js +0.1% +0.1% 598.07 KB 598.58 KB 127.45 KB 127.52 KB NODE_DEV
react-test-renderer.production.min.js 0.0% 0.0% 68.65 KB 68.65 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.1% +0.1% 588.07 KB 588.58 KB 124.59 KB 124.66 KB NODE_DEV
react-reconciler.production.min.js 🔺+0.1% 🔺+0.1% 69.06 KB 69.13 KB 20.44 KB 20.47 KB NODE_PROD
react-reconciler-reflection.production.min.js 0.0% 🔺+0.1% 2.6 KB 2.6 KB 1.16 KB 1.16 KB NODE_PROD
react-reconciler-persistent.development.js +0.1% +0.1% 585.07 KB 585.58 KB 123.33 KB 123.4 KB NODE_DEV
react-reconciler-persistent.production.min.js 🔺+0.1% 🔺+0.1% 69.07 KB 69.14 KB 20.45 KB 20.48 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFabric-profiling.js 0.0% 0.0% 270.47 KB 270.47 KB 46.6 KB 46.6 KB RN_OSS_PROFILING
ReactFabric-dev.js +0.1% 0.0% 743.98 KB 744.43 KB 157.15 KB 157.22 KB RN_FB_DEV
ReactNativeRenderer-dev.js +0.1% 0.0% 737.38 KB 737.82 KB 155.99 KB 156.06 KB RN_OSS_DEV
ReactFabric-profiling.js 0.0% 0.0% 270.46 KB 270.46 KB 46.61 KB 46.61 KB RN_FB_PROFILING
ReactNativeRenderer-dev.js +0.1% 0.0% 737.54 KB 737.98 KB 156.06 KB 156.13 KB RN_FB_DEV
ReactFabric-dev.js +0.1% 0.0% 743.81 KB 744.26 KB 157.07 KB 157.14 KB RN_OSS_DEV

Generated by 🚫 dangerJS against 6acafc3

@sebmarkbage sebmarkbage merged commit b0a8a3e into facebook:master Sep 11, 2019
This was referenced Oct 5, 2019
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