GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Don't recreate the same fallback on the client if hydrating suspends by gaearon · Pull Request #24236 · react/react Conversation
|
|
Comparing: 4db3ff6...6cb9f18 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me. I'm a little suspicious of the renderDidSuspendDelayIfPossible call but there's already a known problem related to that, so I can take a look when I work on that fix.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Let's get Seb to look at the changed tests since this call was his idea |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a test that tests just the simple case. The server errors, the client is suspends but no errors. The fallback doesn’t get replaced. The it unsuspends.
With the rationale spelled out that we don’t want to interrupt animations in the fallback.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
OK so I'll add tests for:
Sounds right @sebmarkbage ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
da9f213 to
e6734cd
Compare
Summary: This sync includes the following changes: - **[e8f4a66](react/react@e8f4a6653 )**: Fix import in example //<dan>// - **[bb49abe](react/react@bb49abea2 )**: Update some READMEs ([#24290](react/react#24290)) //<dan>// - **[4bc465a](react/react@4bc465a16 )**: Rename Controls to PipeableStream ([#24286](react/react#24286)) //<Sebastian Markbåge>// - **[ece5295](react/react@ece5295e5 )**: Remove unnecessary flag check ([#24284](react/react#24284)) //<zhoulixiang>// - **[9ededef](react/react@9ededef94 )**: Don't mute hydration errors forcing client render ([#24276](react/react#24276)) //<dan>// - **[985272e](react/react@985272e26 )**: Fix name mismatch in react-reconciler custom build. ([#24272](react/react#24272)) //<Hikari Hayashi>// - **[b8cfda1](react/react@b8cfda15e )**: changed Transitions type to Array<Transition> ([#24249](react/react#24249)) //<Luna Ruan>// - **[c89a15c](react/react@c89a15c71 )**: [ReactDebugTools] wrap uncaught error from rendering user's component ([#24216](react/react#24216)) //<Mengdi "Monday" Chen>// - **[ebd7ff6](react/react@ebd7ff65b )**: Don't recreate the same fallback on the client if hydrating suspends ([#24236](react/react#24236)) //<dan>// - **[aa05e73](react/react@aa05e7315 )**: Add 4.4.0 release to eslint rules CHANGELOG ([#24234](react/react#24234)) //<Brian Vaughn>// - **[7e3121e](react/react@7e3121e1c )**: Remove unstable_createMutableSource from experimental build ([#24209](react/react#24209)) //<Sebastian Silbermann>// - **[0415b18](react/react@0415b18a1 )**: [ReactDebugTools] add custom error type for future new hooks ([#24168](react/react#24168)) //<Mengdi "Monday" Chen>// Changelog: [General][Changed] - React Native sync for revisions 34aa5cf...e8f4a66 jest_e2e[run_all_tests] Reviewed By: kacieb Differential Revision: D35581059 fbshipit-source-id: ee031dfc49b1ef663b601f33f3f3f6c5a804971e
…24236) * Delay showing fallback if hydrating suspends * Fix up * Include all non-urgent lanes * Moar tests * Add test for transitions
…24236) * Delay showing fallback if hydrating suspends * Fix up * Include all non-urgent lanes * Moar tests * Add test for transitions
…24236) * Delay showing fallback if hydrating suspends * Fix up * Include all non-urgent lanes * Moar tests * Add test for transitions
…eact#24236) * Delay showing fallback if hydrating suspends * Fix up * Include all non-urgent lanes * Moar tests * Add test for transitions
… hydrating suspends)
|
I reverted this in #24434. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Summary: This sync includes the following changes: - **[e8f4a66](react/react@e8f4a6653 )**: Fix import in example //<dan>// - **[bb49abe](react/react@bb49abea2 )**: Update some READMEs ([react#24290](react/react#24290)) //<dan>// - **[4bc465a](react/react@4bc465a16 )**: Rename Controls to PipeableStream ([react#24286](react/react#24286)) //<Sebastian Markbåge>// - **[ece5295](react/react@ece5295e5 )**: Remove unnecessary flag check ([react#24284](react/react#24284)) //<zhoulixiang>// - **[9ededef](react/react@9ededef94 )**: Don't mute hydration errors forcing client render ([react#24276](react/react#24276)) //<dan>// - **[985272e](react/react@985272e26 )**: Fix name mismatch in react-reconciler custom build. ([react#24272](react/react#24272)) //<Hikari Hayashi>// - **[b8cfda1](react/react@b8cfda15e )**: changed Transitions type to Array<Transition> ([react#24249](react/react#24249)) //<Luna Ruan>// - **[c89a15c](react/react@c89a15c71 )**: [ReactDebugTools] wrap uncaught error from rendering user's component ([react#24216](react/react#24216)) //<Mengdi "Monday" Chen>// - **[ebd7ff6](react/react@ebd7ff65b )**: Don't recreate the same fallback on the client if hydrating suspends ([react#24236](react/react#24236)) //<dan>// - **[aa05e73](react/react@aa05e7315 )**: Add 4.4.0 release to eslint rules CHANGELOG ([react#24234](react/react#24234)) //<Brian Vaughn>// - **[7e3121e](react/react@7e3121e1c )**: Remove unstable_createMutableSource from experimental build ([react#24209](react/react#24209)) //<Sebastian Silbermann>// - **[0415b18](react/react@0415b18a1 )**: [ReactDebugTools] add custom error type for future new hooks ([react#24168](react/react#24168)) //<Mengdi "Monday" Chen>// Changelog: [General][Changed] - React Native sync for revisions 34aa5cf...e8f4a66 jest_e2e[run_all_tests] Reviewed By: kacieb Differential Revision: D35581059 fbshipit-source-id: ee031dfc49b1ef663b601f33f3f3f6c5a804971e
…eact#24236) * Delay showing fallback if hydrating suspends * Fix up * Include all non-urgent lanes * Moar tests * Add test for transitions
… hydrating suspends) (react#24434) * Revert react#24236 (Don't recreate the same fallback on the client if hydrating suspends) * Use @gate FIXME
…eact#24236) * Delay showing fallback if hydrating suspends * Fix up * Include all non-urgent lanes * Moar tests * Add test for transitions
… hydrating suspends) (react#24434) * Revert react#24236 (Don't recreate the same fallback on the client if hydrating suspends) * Use @gate FIXME
When the server leaves a boundary in its fallback state (browser(), abort, or a server error) and the client render suspends on data, React deleted the server fallback and mounted an identical one, restarting CSS animations (react#37620). If the boundary hasn't received new props or a context change, it now stays dehydrated and keeps the server fallback until the data resolves, then retries at a normal retry lane. This is scoped to the boundary and doesn't change when the root commits, unlike react#24236. The server error is still reported in the same commit as before, and a keptServerFallback flag prevents reporting it again on retry. A kept boundary checks for context changes when it bails out, so the fallback still updates when a context it reads changes. Updates with new props and suspensey resources recreate the fallback as before. Re-enable the react#24236 tests that now pass, updated for current error messages and retry throttling. The transition test stays gated: we don't hold transitions to keep the server fallback.
When a boundary's server render failed (or is client-only) and its client children suspend while hydrating, we used to delete the server rendered fallback and mount a new one, which restarted CSS animations and threw away markup that was still correct. If the server markup for the boundary is the fallback, hydrate it in place instead: pause hydration while the primary children (which have no server markup) render, resume it when the fallback begins, and keep the dehydrated instance around so the cursor can move past the boundary. Nothing is deleted so the existing DOM nodes are reused. If the fallback markup doesn't match, the mismatch is recoverable: the boundary client renders the fallback once and only then gives up on hydration. Re-enables the three tests that were commented out when the earlier attempt (react#24236) was reverted for causing late mutations on WWW. Unlike that patch, this one still commits the fallback in the same render.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.