dillon1000/react

Commit

[Static][Fizz] bootstrap scripts should only emit once (#27674)

I introduced a bug in a recent change to how bootstrap scripts are
handled. Rather than clearing out the bootstrap script state from
ResumableState on completion of the prerender I did it during the
flushing phase which comes later after the postponed state has likely
been serialized. We should freeze these objects in dev so this is not
possible to do easily in test (nor in actual code in real systems).

This fixes the bug by eliminating the bootstrap config during
getPostponedState which is before the state can be serialized.
Browse files
Changed paths6 files
First-parent comparison
M packages/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 Modified
Patch

Files changed

Rendering syntax-highlighted changes…