dillon1000/react
Commit
Browse files [Fizz] Prerender fallbacks before children (#30483)
When prerendering it can be convenient to abort the prerender while rendering. However if any Suspense fallbacks have not yet rendered before the abort happens the fallback itself will error and cause the nearest parent Suspense boundary to render a fallback instead. Prerenders are by definition not time critical so the prioritization of children over fallbacks which makes sense for render isn't similarly motivated for prerender. Given this, this change updates fallback rendering during a prerender to attempt the fallback before attempting children.
Changed paths3 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMFizzStatic-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…