-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Unify RootDidNotComplete and RootSuspendedWithDelay exit path #31547
Conversation
Both now go through finishConcurrentRender (which is not just for concurrent).
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
// cases where need to exit the current render without producing a | ||
// consistent tree or committing. | ||
const didAttemptEntireTree = !workInProgressRootDidSkipSuspendedSiblings; | ||
markRootSuspended(root, lanes, NoLane, didAttemptEntireTree); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the else
branch we just fall through to finishConcurrentRender
since we won't be concurrent and it doesn't match the explicit exitStatus checks.
Therefore we enter the same path as RootSuspendedWithDelay and we can use the same code path.
didAttemptEntireTree, | ||
); | ||
return; | ||
if (!includesOnlyTransitions(lanes)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the subtle difference that RootSuspendedWithDelay
checks the lanes but maybe we should just do that before setting the flag in the first place?
Comparing: 63cde68...8f8b017 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) |
Also rename RootDidNotComplete to RootSuspendedAtTheShell since it specifically means something suspended in the shell during hydration.