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

Reset hydration state after reentering #16306

Merged
merged 1 commit into from
Aug 7, 2019

Conversation

sebmarkbage
Copy link
Collaborator

We might reenter a hydration state, when attempting to hydrate a boundary. We need to ensure that we reset it to not hydrating once we exit it. Otherwise the next sibling will still be in hydration mode.

We might reenter a hydration state, when attempting to hydrate a boundary.
We need to ensure that we reset it to not hydrating once we exit it.
Otherwise the next sibling will still be in hydration mode.
@@ -134,7 +139,6 @@ function unwindInterruptedWork(interruptedWork: Fiber) {
break;
case DehydratedSuspenseComponent:
if (enableSuspenseServerRenderer) {
// TODO: popHydrationState
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This one is not needed since restarting the root covers it. I think anything covered by resetFreshStack also doesn't need to be here.

popSuspenseContext(workInProgress);
if (workInProgress.alternate === null) {
// TODO: popHydrationState
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't actually do this yet because this because popping causes hydration warnings. This is part of a larger bug that suspending in a dehydrated tree can leave the hydration context in an inconsistent state when we move to work on the sibling of the thing that suspended. That's a bigger issue to fix.

@sizebot
Copy link

sizebot commented Aug 7, 2019

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

Details of bundled changes.

Comparing: 7c838a6...a9cc9a5

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js +0.1% +0.1% 646.63 KB 647.38 KB 141.1 KB 141.27 KB UMD_DEV
react-art.production.min.js 0.0% -0.0% 102.36 KB 102.36 KB 31.24 KB 31.24 KB UMD_PROD
react-art.development.js +0.1% +0.1% 577.5 KB 578.26 KB 123.69 KB 123.85 KB NODE_DEV
react-art.production.min.js 0.0% -0.0% 67.41 KB 67.41 KB 20.56 KB 20.56 KB NODE_PROD
ReactART-dev.js +0.1% +0.1% 591.85 KB 592.63 KB 123.31 KB 123.49 KB FB_WWW_DEV

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.09 KB 115.09 KB 36.24 KB 36.24 KB NODE_PROFILING
ReactDOM-dev.js +0.1% +0.1% 933.2 KB 933.98 KB 206.26 KB 206.45 KB FB_WWW_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 19.39 KB 19.39 KB 7.27 KB 7.27 KB UMD_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.78 KB 3.78 KB 1.52 KB 1.52 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.1% 11.32 KB 11.32 KB 4.18 KB 4.18 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.1% 1.21 KB 1.21 KB 707 B 706 B UMD_PROD
react-dom-test-utils.development.js 0.0% -0.0% 53.99 KB 53.99 KB 14.62 KB 14.62 KB NODE_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.61 KB 3.61 KB 1.48 KB 1.47 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 11.1 KB 11.1 KB 4.13 KB 4.13 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1.05 KB 1.05 KB 638 B 637 B NODE_PROD
react-dom.development.js +0.1% +0.1% 909.35 KB 910.11 KB 206.15 KB 206.32 KB UMD_DEV
react-dom.production.min.js 0.0% -0.0% 111.47 KB 111.47 KB 35.86 KB 35.86 KB UMD_PROD
react-dom.profiling.min.js 0.0% -0.0% 114.88 KB 114.88 KB 36.88 KB 36.88 KB UMD_PROFILING
react-dom.development.js +0.1% +0.1% 903.65 KB 904.41 KB 204.56 KB 204.73 KB NODE_DEV
react-dom-server.node.development.js 0.0% -0.0% 136.57 KB 136.57 KB 36.04 KB 36.04 KB NODE_DEV
react-dom.production.min.js 0.0% -0.0% 111.45 KB 111.45 KB 35.29 KB 35.29 KB NODE_PROD
ReactDOM-prod.js 0.0% 0.0% 372.98 KB 373.1 KB 68.47 KB 68.49 KB FB_WWW_PROD
ReactDOM-profiling.js 0.0% 0.0% 377.5 KB 377.61 KB 69.5 KB 69.51 KB FB_WWW_PROFILING
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.76 KB 60.76 KB 15.85 KB 15.85 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 10.74 KB 10.74 KB 3.68 KB 3.68 KB UMD_PROD
ReactDOMServer-dev.js 0.0% -0.0% 137.06 KB 137.06 KB 34.93 KB 34.93 KB FB_WWW_DEV
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.43 KB 60.43 KB 15.72 KB 15.72 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 3.85 KB 3.85 KB 1.5 KB 1.5 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.48 KB 10.48 KB 3.58 KB 3.58 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% -0.1% 1.1 KB 1.1 KB 668 B 667 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% 602.75 KB 603.53 KB 125.75 KB 125.92 KB FB_WWW_DEV
react-test-renderer-shallow.development.js 0.0% -0.0% 39.51 KB 39.51 KB 9.95 KB 9.95 KB UMD_DEV
react-test-renderer-shallow.production.min.js 0.0% -0.0% 11.66 KB 11.66 KB 3.56 KB 3.56 KB UMD_PROD
react-test-renderer-shallow.development.js 0.0% -0.0% 33.64 KB 33.64 KB 8.54 KB 8.53 KB NODE_DEV
react-test-renderer-shallow.production.min.js 0.0% -0.0% 11.81 KB 11.81 KB 3.69 KB 3.69 KB NODE_PROD
react-test-renderer.development.js +0.1% +0.1% 590.4 KB 591.16 KB 126.27 KB 126.44 KB UMD_DEV
react-test-renderer.production.min.js 0.0% -0.0% 69.05 KB 69.05 KB 21.15 KB 21.15 KB UMD_PROD
react-test-renderer.development.js +0.1% +0.1% 585.94 KB 586.7 KB 125.18 KB 125.34 KB NODE_DEV
react-test-renderer.production.min.js 0.0% -0.0% 68.78 KB 68.78 KB 20.93 KB 20.93 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% 575.59 KB 576.35 KB 122.23 KB 122.4 KB NODE_DEV
react-reconciler-reflection.production.min.js 0.0% -0.1% 2.59 KB 2.59 KB 1.14 KB 1.14 KB NODE_PROD
react-reconciler-persistent.development.js +0.1% +0.1% 572.6 KB 573.36 KB 120.98 KB 121.14 KB NODE_DEV
react-reconciler-persistent.production.min.js 0.0% -0.0% 68.67 KB 68.67 KB 20.42 KB 20.42 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-profiling.js 0.0% -0.0% 281.01 KB 281.01 KB 48.26 KB 48.25 KB RN_OSS_PROFILING
ReactFabric-prod.js 0.0% -0.0% 265.41 KB 265.41 KB 45.67 KB 45.67 KB RN_OSS_PROD
ReactFabric-dev.js +0.1% +0.1% 736.62 KB 737.4 KB 155.65 KB 155.83 KB RN_FB_DEV
ReactFabric-prod.js 0.0% -0.0% 265.41 KB 265.41 KB 45.68 KB 45.68 KB RN_FB_PROD
ReactNativeRenderer-dev.js +0.1% +0.1% 725.78 KB 726.56 KB 153.56 KB 153.74 KB RN_OSS_DEV
ReactFabric-profiling.js 0.0% -0.0% 274.07 KB 274.07 KB 47.12 KB 47.12 KB RN_FB_PROFILING
ReactNativeRenderer-dev.js +0.1% +0.1% 725.87 KB 726.65 KB 153.61 KB 153.79 KB RN_FB_DEV
ReactNativeRenderer-prod.js 0.0% -0.0% 272.58 KB 272.58 KB 46.75 KB 46.75 KB RN_FB_PROD
ReactNativeRenderer-profiling.js 0.0% -0.0% 281 KB 281 KB 48.26 KB 48.26 KB RN_FB_PROFILING
ReactFabric-dev.js +0.1% +0.1% 736.52 KB 737.3 KB 155.6 KB 155.79 KB RN_OSS_DEV

Generated by 🚫 dangerJS

@sebmarkbage sebmarkbage merged commit 6f3c833 into facebook:master Aug 7, 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.

5 participants