-
Notifications
You must be signed in to change notification settings - Fork 49.8k
[Fizz] Update postpone abort semantics when prerendering #30541
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| if (trackedPostpones !== null && segment !== null) { | ||
| // We are prerendering. We don't want to fatal when the shell postpones | ||
| // we just need to mark it as postponed. | ||
| logPostpone(request, postponeInstance.message, errorInfo, null); | ||
| trackPostpone(request, trackedPostpones, task, segment); | ||
| finishedTask(request, null, segment); | ||
| } else { |
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.
The factoring here isn't great but I don't want to completely refactor this code. I have to recheck wether the segment actually exists to mark it as postponable but if we're tracking postpones it would definitely exist. But mabye I should
|
Comparing: 2b00018...2afe9c6 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show |
| ); | ||
| }); | ||
|
|
||
| // @gate experimental |
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.
Should be gated on enablePostpone I guess.
When aborting with a postpone value in Fizz if any tasks are still pending in the root while prerendering the prerender will fatally error. This is different from postponing imperatively in a root task and really the semantics should be the same. This change updatse React to treat an abort with a postpone value as a postponed root rather than a fatal error.
When aborting with a postpone value in Fizz if any tasks are still pending in the root while prerendering the prerender will fatally error. This is different from postponing imperatively in a root task and really the semantics should be the same. This change updates React to treat an abort with a postpone value as a postponed root rather than a fatal error. DiffTrain build for [a7d1240](a7d1240)
When aborting with a postpone value in Fizz if any tasks are still pending in the root while prerendering the prerender will fatally error. This is different from postponing imperatively in a root task and really the semantics should be the same. This change updates React to treat an abort with a postpone value as a postponed root rather than a fatal error.