dillon1000/react
Commit
Browse files [Fizz] Postponing in the shell (#27569)
When we postpone a prerender in the shell, we should just leave an empty prelude and resume from the root. While preserving any options passed in. Since we haven't flushed anything we can't assume we've already emitted html/body tags or any resources tracked in the resumable state. This introduces a resetResumableState function to reset anything we didn't flush. This is a bit hacky. Ideally, we probably shouldn't have tracked it as already happened until it flushed or something like that. Basically, it's like restarting the prerender with the same options and then immediately aborting. When we add the preload headers, we'd track those as preload() being emitted after the reset and so they get readded to the resumable state in that case.
Changed paths6 files
First-parent comparisonpackages/react-dom-bindings/src/server/ReactFizzConfigDOM.js ModifiedM packages/react-dom-bindings/src/server/ReactFizzConfigDOMLegacy.js ModifiedM packages/react-dom/src/__tests__/ReactDOMFizzStaticBrowser-test.js ModifiedM packages/react-noop-renderer/src/ReactNoopServer.js ModifiedM packages/react-server/src/ReactFizzServer.js ModifiedM packages/react-server/src/forks/ReactFizzConfig.custom.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…