dillon1000/react
Commit
Browse files [Fizz][Static] when aborting a prerender halt unfinished boundaries instead of erroring (#30732)
When we introduced prerendering for flight we modeled an abort of a flight prerender as having unfinished rows. This is similar to how postpone was already implemented when you postponed from "within" a prerender using React.unstable_postpone. However when aborting with a postponed instance every boundary would be eagerly marked for client rendering which is more akin to prerendering and then resuming with an aborted signal. The insight with the flight work was that it's not so much the postpone that describes the intended semantics but the abort combined with a prerender. So like in flight when you abort a prerender and enableHalt is enabled boundaries and the shell won't error for any reason. Fizz will still call onPostpone and onError according to the abort reason but the consuemr of the prerender should expect to resume it before trying to use it.
Changed paths5 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMFizzServer-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMFizzStatic-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMFizzStaticBrowser-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMFizzStaticNode-test.js ModifiedM packages/react-server/src/ReactFizzServer.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…