Skip to content
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

[Fizz] Split ResponseState/Resources into RenderState/ResumableState #27268

Merged
merged 6 commits into from
Aug 22, 2023

Conversation

sebmarkbage
Copy link
Collaborator

This exposes a resume() API to go with the prerender() (only in experimental). It doesn't work yet since we don't yet emit the postponed state so not yet tested.

The main thing this does is rename ResponseState->RenderState and Resources->ResumableState. We separated out resources into a separate concept preemptively since it seemed like separate enough but probably doesn't warrant being a separate concept. The result is that we have a per RenderState in the Config which is really just temporary state and things that must be flushed completely in the prerender. Most things should be ResumableState.

Most options are specified in the prerender() and transferred into the resume() but certain options that are unique per request can't be. Notably nonce is special. This means that bootstrap scripts and external runtime can't use nonce in this mode. They need to have a CSP configured to deal with external scripts, but not inline.

We need to be able to restore state of things that we've already emitted in the prerender. We could have separate snapshot/restore methods that does this work when it happens but that means we have to explicitly do that work. This design is trying to keep to the principle that we just work with resumable data structures instead so that we're designing for it with every feature. It also makes restoring faster since it's just straight into the data structure.

This is not yet a serializable format. That can be done in a follow up.

We also need to vet that each step makes sense. Notably stylesToHoist is a bit unclear how it'll work.

@sebmarkbage sebmarkbage requested a review from gnoff August 22, 2023 16:31
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Aug 22, 2023
@sebmarkbage sebmarkbage force-pushed the fizzresume branch 2 times, most recently from e6300e8 to e9feaab Compare August 22, 2023 16:41
@react-sizebot
Copy link

react-sizebot commented Aug 22, 2023

Comparing: 86198b9...92d4029

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 165.59 kB 165.59 kB = 51.88 kB 51.88 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 173.15 kB 173.15 kB = 54.20 kB 54.20 kB
facebook-www/ReactDOM-prod.classic.js = 569.82 kB 569.82 kB = 100.37 kB 100.37 kB
facebook-www/ReactDOM-prod.modern.js = 553.62 kB 553.62 kB = 97.53 kB 97.53 kB
oss-experimental/react-dom/server.node.js +7.28% 0.65 kB 0.69 kB +7.20% 0.25 kB 0.27 kB
oss-stable-semver/react-dom/server.node.js +7.28% 0.65 kB 0.69 kB +7.20% 0.25 kB 0.27 kB
oss-stable/react-dom/server.node.js +7.28% 0.65 kB 0.69 kB +7.20% 0.25 kB 0.27 kB
oss-experimental/react-dom/server.bun.js +7.19% 0.65 kB 0.70 kB +7.42% 0.26 kB 0.28 kB
oss-stable-semver/react-dom/server.bun.js +7.19% 0.65 kB 0.70 kB +7.42% 0.26 kB 0.28 kB
oss-stable/react-dom/server.bun.js +7.19% 0.65 kB 0.70 kB +7.42% 0.26 kB 0.28 kB
oss-experimental/react-dom/server.edge.js +7.16% 0.66 kB 0.70 kB +7.78% 0.26 kB 0.28 kB
oss-stable-semver/react-dom/server.edge.js +7.16% 0.66 kB 0.70 kB +7.78% 0.26 kB 0.28 kB
oss-stable/react-dom/server.edge.js +7.16% 0.66 kB 0.70 kB +7.78% 0.26 kB 0.28 kB
oss-experimental/react-dom/server.browser.js +7.14% 0.66 kB 0.71 kB +6.72% 0.25 kB 0.27 kB
oss-stable-semver/react-dom/server.browser.js +7.14% 0.66 kB 0.71 kB +6.72% 0.25 kB 0.27 kB
oss-stable/react-dom/server.browser.js +7.14% 0.66 kB 0.71 kB +6.72% 0.25 kB 0.27 kB
facebook-www/ReactDOMServer-prod.modern.js +3.96% 148.20 kB 154.08 kB +3.42% 26.95 kB 27.87 kB
facebook-www/ReactDOMServer-prod.classic.js +3.94% 148.94 kB 154.81 kB +3.37% 27.18 kB 28.10 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +2.78% 60.90 kB 62.59 kB +3.20% 18.15 kB 18.73 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +2.78% 60.93 kB 62.62 kB +3.20% 18.17 kB 18.75 kB
oss-stable-semver/react-dom/umd/react-dom-server-legacy.browser.production.min.js +2.77% 61.06 kB 62.75 kB +3.00% 18.49 kB 19.04 kB
oss-stable/react-dom/umd/react-dom-server-legacy.browser.production.min.js +2.77% 61.09 kB 62.78 kB +2.98% 18.51 kB 19.06 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +2.70% 62.95 kB 64.64 kB +2.98% 18.94 kB 19.51 kB
oss-experimental/react-dom/umd/react-dom-server-legacy.browser.production.min.js +2.69% 63.10 kB 64.80 kB +2.74% 19.36 kB 19.89 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.production.min.js +2.60% 65.76 kB 67.48 kB +2.76% 19.79 kB 20.34 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.production.min.js +2.60% 65.79 kB 67.50 kB +2.76% 19.82 kB 20.36 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.production.min.js +2.53% 67.92 kB 69.64 kB +2.52% 20.64 kB 21.16 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-dom/server.node.js +7.28% 0.65 kB 0.69 kB +7.20% 0.25 kB 0.27 kB
oss-stable-semver/react-dom/server.node.js +7.28% 0.65 kB 0.69 kB +7.20% 0.25 kB 0.27 kB
oss-stable/react-dom/server.node.js +7.28% 0.65 kB 0.69 kB +7.20% 0.25 kB 0.27 kB
oss-experimental/react-dom/server.bun.js +7.19% 0.65 kB 0.70 kB +7.42% 0.26 kB 0.28 kB
oss-stable-semver/react-dom/server.bun.js +7.19% 0.65 kB 0.70 kB +7.42% 0.26 kB 0.28 kB
oss-stable/react-dom/server.bun.js +7.19% 0.65 kB 0.70 kB +7.42% 0.26 kB 0.28 kB
oss-experimental/react-dom/server.edge.js +7.16% 0.66 kB 0.70 kB +7.78% 0.26 kB 0.28 kB
oss-stable-semver/react-dom/server.edge.js +7.16% 0.66 kB 0.70 kB +7.78% 0.26 kB 0.28 kB
oss-stable/react-dom/server.edge.js +7.16% 0.66 kB 0.70 kB +7.78% 0.26 kB 0.28 kB
oss-experimental/react-dom/server.browser.js +7.14% 0.66 kB 0.71 kB +6.72% 0.25 kB 0.27 kB
oss-stable-semver/react-dom/server.browser.js +7.14% 0.66 kB 0.71 kB +6.72% 0.25 kB 0.27 kB
oss-stable/react-dom/server.browser.js +7.14% 0.66 kB 0.71 kB +6.72% 0.25 kB 0.27 kB
facebook-www/ReactDOMServer-prod.modern.js +3.96% 148.20 kB 154.08 kB +3.42% 26.95 kB 27.87 kB
facebook-www/ReactDOMServer-prod.classic.js +3.94% 148.94 kB 154.81 kB +3.37% 27.18 kB 28.10 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +2.78% 60.90 kB 62.59 kB +3.20% 18.15 kB 18.73 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +2.78% 60.93 kB 62.62 kB +3.20% 18.17 kB 18.75 kB
oss-stable-semver/react-dom/umd/react-dom-server-legacy.browser.production.min.js +2.77% 61.06 kB 62.75 kB +3.00% 18.49 kB 19.04 kB
oss-stable/react-dom/umd/react-dom-server-legacy.browser.production.min.js +2.77% 61.09 kB 62.78 kB +2.98% 18.51 kB 19.06 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +2.70% 62.95 kB 64.64 kB +2.98% 18.94 kB 19.51 kB
oss-experimental/react-dom/umd/react-dom-server-legacy.browser.production.min.js +2.69% 63.10 kB 64.80 kB +2.74% 19.36 kB 19.89 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.production.min.js +2.60% 65.76 kB 67.48 kB +2.76% 19.79 kB 20.34 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.production.min.js +2.60% 65.79 kB 67.50 kB +2.76% 19.82 kB 20.36 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.production.min.js +2.53% 67.92 kB 69.64 kB +2.52% 20.64 kB 21.16 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.production.min.js +1.43% 64.62 kB 65.55 kB +0.82% 20.08 kB 20.25 kB
oss-experimental/react-dom/umd/react-dom-server.browser.production.min.js +1.42% 64.77 kB 65.69 kB +0.74% 20.31 kB 20.47 kB
oss-experimental/react-dom/cjs/react-dom-server.node.production.min.js +1.37% 69.06 kB 70.00 kB +1.12% 21.56 kB 21.80 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.production.min.js +1.29% 68.96 kB 69.85 kB +0.74% 21.56 kB 21.72 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.development.js +0.99% 355.12 kB 358.64 kB +0.35% 79.97 kB 80.25 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.development.js +0.99% 355.53 kB 359.05 kB +0.35% 80.10 kB 80.38 kB
oss-experimental/react-dom/umd/react-dom-server.browser.development.js +0.98% 372.19 kB 375.82 kB +0.34% 80.85 kB 81.12 kB
oss-experimental/react-dom/cjs/react-dom-server.node.development.js +0.84% 356.60 kB 359.58 kB +0.35% 80.02 kB 80.30 kB
facebook-www/ReactDOMServerStreaming-prod.modern.js +0.83% 154.91 kB 156.20 kB +0.38% 28.69 kB 28.80 kB
facebook-www/ReactDOMServerStreaming-dev.modern.js +0.49% 348.26 kB 349.96 kB +0.38% 77.02 kB 77.32 kB
oss-experimental/react-dom/cjs/react-dom-static.node.development.js +0.48% 356.56 kB 358.26 kB +0.32% 80.11 kB 80.36 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.development.js +0.48% 354.42 kB 356.12 kB +0.32% 79.78 kB 80.04 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.development.js +0.48% 354.83 kB 356.53 kB +0.32% 79.91 kB 80.17 kB
oss-stable-semver/react-server/cjs/react-server.production.min.js +0.46% 25.40 kB 25.52 kB +0.23% 8.65 kB 8.67 kB
oss-stable/react-server/cjs/react-server.production.min.js +0.46% 25.40 kB 25.52 kB +0.23% 8.65 kB 8.67 kB
oss-experimental/react-server/cjs/react-server.production.min.js +0.45% 26.03 kB 26.15 kB +0.25% 8.86 kB 8.89 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.development.js +0.45% 352.92 kB 354.49 kB +0.26% 79.29 kB 79.50 kB
oss-stable-semver/react-dom/cjs/react-dom-server.bun.development.js +0.44% 342.34 kB 343.85 kB +0.39% 76.89 kB 77.19 kB
oss-stable/react-dom/cjs/react-dom-server.bun.development.js +0.44% 342.37 kB 343.88 kB +0.39% 76.92 kB 77.22 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.development.js +0.44% 345.12 kB 346.63 kB +0.39% 77.79 kB 78.09 kB
oss-stable/react-dom/cjs/react-dom-server.browser.development.js +0.44% 345.14 kB 346.65 kB +0.38% 77.82 kB 78.12 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.development.js +0.44% 345.53 kB 347.04 kB +0.39% 77.91 kB 78.22 kB
oss-stable/react-dom/cjs/react-dom-server.edge.development.js +0.44% 345.55 kB 347.06 kB +0.39% 77.94 kB 78.25 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.development.js +0.44% 346.59 kB 348.11 kB +0.38% 77.83 kB 78.13 kB
oss-stable/react-dom/cjs/react-dom-server.node.development.js +0.44% 346.62 kB 348.13 kB +0.38% 77.86 kB 78.16 kB
oss-stable-semver/react-dom/umd/react-dom-server.browser.development.js +0.42% 361.74 kB 363.27 kB +0.31% 78.72 kB 78.96 kB
oss-stable/react-dom/umd/react-dom-server.browser.development.js +0.42% 361.77 kB 363.30 kB +0.31% 78.75 kB 78.99 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.production.min.js +0.39% 64.50 kB 64.76 kB +0.41% 20.03 kB 20.11 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.production.min.js +0.39% 64.83 kB 65.08 kB +0.48% 20.13 kB 20.23 kB
oss-stable-semver/react-dom/umd/react-dom-server.browser.production.min.js +0.39% 63.28 kB 63.53 kB +0.41% 19.78 kB 19.87 kB
oss-stable/react-dom/umd/react-dom-server.browser.production.min.js +0.39% 63.31 kB 63.56 kB +0.41% 19.81 kB 19.89 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.production.min.js +0.39% 63.13 kB 63.38 kB +0.34% 19.53 kB 19.60 kB
oss-stable/react-dom/cjs/react-dom-server.browser.production.min.js +0.39% 63.16 kB 63.40 kB +0.33% 19.56 kB 19.62 kB
oss-stable-semver/react-dom/cjs/react-dom-server.bun.production.min.js +0.39% 65.50 kB 65.75 kB +0.45% 19.93 kB 20.02 kB
oss-stable/react-dom/cjs/react-dom-server.bun.production.min.js +0.39% 65.52 kB 65.78 kB +0.45% 19.96 kB 20.05 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.production.min.js +0.38% 67.65 kB 67.91 kB +0.48% 20.77 kB 20.87 kB
oss-experimental/react-dom/cjs/react-dom-static.node.production.min.js +0.37% 69.03 kB 69.29 kB +0.36% 21.59 kB 21.67 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.production.min.js +0.37% 67.36 kB 67.61 kB +0.29% 20.96 kB 21.02 kB
oss-stable/react-dom/cjs/react-dom-server.edge.production.min.js +0.37% 67.39 kB 67.63 kB +0.28% 20.99 kB 21.05 kB
facebook-www/ReactDOMServer-dev.modern.js +0.34% 353.52 kB 354.72 kB +0.24% 78.28 kB 78.46 kB
facebook-www/ReactDOMServer-dev.classic.js +0.33% 360.94 kB 362.15 kB +0.22% 79.93 kB 80.10 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.development.js +0.33% 357.78 kB 358.95 kB +0.12% 80.33 kB 80.43 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.development.js +0.32% 347.19 kB 348.31 kB +0.23% 77.94 kB 78.12 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.development.js +0.32% 347.22 kB 348.34 kB +0.23% 77.97 kB 78.15 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.production.min.js +0.31% 67.46 kB 67.67 kB +0.32% 20.96 kB 21.03 kB
oss-stable/react-dom/cjs/react-dom-server.node.production.min.js +0.31% 67.49 kB 67.70 kB +0.32% 20.99 kB 21.06 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.development.js +0.31% 355.95 kB 357.04 kB +0.13% 79.87 kB 79.98 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.development.js +0.30% 345.37 kB 346.40 kB +0.24% 77.48 kB 77.66 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.development.js +0.30% 345.39 kB 346.43 kB +0.23% 77.51 kB 77.69 kB
oss-experimental/react-dom/umd/react-dom-server-legacy.browser.development.js +0.30% 373.03 kB 374.13 kB +0.11% 80.72 kB 80.81 kB
oss-stable-semver/react-dom/umd/react-dom-server-legacy.browser.development.js +0.29% 362.00 kB 363.04 kB +0.17% 78.36 kB 78.49 kB
oss-stable/react-dom/umd/react-dom-server-legacy.browser.development.js +0.29% 362.03 kB 363.07 kB +0.16% 78.38 kB 78.51 kB
oss-stable-semver/react-server/cjs/react-server.development.js +0.21% 148.13 kB 148.43 kB +0.15% 36.92 kB 36.97 kB
oss-stable/react-server/cjs/react-server.development.js +0.21% 148.13 kB 148.43 kB +0.15% 36.92 kB 36.97 kB
oss-experimental/react-server/cjs/react-server.development.js +0.20% 150.11 kB 150.42 kB +0.14% 37.35 kB 37.40 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-server.development.js = 6.50 kB 6.42 kB = 1.80 kB 1.79 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-server.development.js = 6.50 kB 6.42 kB = 1.80 kB 1.79 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-server.development.js = 6.50 kB 6.42 kB = 1.80 kB 1.79 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-server.production.min.js = 3.23 kB 3.19 kB = 1.22 kB 1.22 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-server.production.min.js = 3.23 kB 3.19 kB = 1.22 kB 1.22 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-server.production.min.js = 3.23 kB 3.19 kB = 1.22 kB 1.22 kB

Generated by 🚫 dangerJS against 92d4029

// Per request, global state that is not contextual to the rendering subtree.
// This cannot be resumed and therefore should only contain things that are
// temporary working state or are never used in the prerender pass.
export type RenderState = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this missing stylesToHoist?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no?


// Hoistable chunks
charsetChunks: Array<Chunk | PrecomputedChunk>,
preconnectChunks: Array<Chunk | PrecomputedChunk>,
preloadChunks: Array<Chunk | PrecomputedChunk>,
hoistableChunks: Array<Chunk | PrecomputedChunk>,

// Module-global-like reference for current boundary resources
boundaryResources: ?BoundaryResources,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's surprising in a way that BoundaryResources would be render state. maybe worth clarifying here why this is possible?

This was plural because in the future the result can contain multiple
streams but since it's mostly just one primary one it seems more confusion
that it's not similar to the other API.
Since we don't have a top level module for these we have to introduce one
that we can fork.
We can split these at the startWork layer instead.
@sebmarkbage sebmarkbage merged commit 31034b6 into facebook:main Aug 22, 2023
36 checks passed
github-actions bot pushed a commit that referenced this pull request Aug 22, 2023
…27268)

This exposes a `resume()` API to go with the `prerender()` (only in
experimental). It doesn't work yet since we don't yet emit the postponed
state so not yet tested.

The main thing this does is rename ResponseState->RenderState and
Resources->ResumableState. We separated out resources into a separate
concept preemptively since it seemed like separate enough but probably
doesn't warrant being a separate concept. The result is that we have a
per RenderState in the Config which is really just temporary state and
things that must be flushed completely in the prerender. Most things
should be ResumableState.

Most options are specified in the `prerender()` and transferred into the
`resume()` but certain options that are unique per request can't be.
Notably `nonce` is special. This means that bootstrap scripts and
external runtime can't use `nonce` in this mode. They need to have a CSP
configured to deal with external scripts, but not inline.

We need to be able to restore state of things that we've already emitted
in the prerender. We could have separate snapshot/restore methods that
does this work when it happens but that means we have to explicitly do
that work. This design is trying to keep to the principle that we just
work with resumable data structures instead so that we're designing for
it with every feature. It also makes restoring faster since it's just
straight into the data structure.

This is not yet a serializable format. That can be done in a follow up.

We also need to vet that each step makes sense. Notably stylesToHoist is
a bit unclear how it'll work.

DiffTrain build for [31034b6](31034b6)
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
…acebook#27268)

This exposes a `resume()` API to go with the `prerender()` (only in
experimental). It doesn't work yet since we don't yet emit the postponed
state so not yet tested.

The main thing this does is rename ResponseState->RenderState and
Resources->ResumableState. We separated out resources into a separate
concept preemptively since it seemed like separate enough but probably
doesn't warrant being a separate concept. The result is that we have a
per RenderState in the Config which is really just temporary state and
things that must be flushed completely in the prerender. Most things
should be ResumableState.

Most options are specified in the `prerender()` and transferred into the
`resume()` but certain options that are unique per request can't be.
Notably `nonce` is special. This means that bootstrap scripts and
external runtime can't use `nonce` in this mode. They need to have a CSP
configured to deal with external scripts, but not inline.

We need to be able to restore state of things that we've already emitted
in the prerender. We could have separate snapshot/restore methods that
does this work when it happens but that means we have to explicitly do
that work. This design is trying to keep to the principle that we just
work with resumable data structures instead so that we're designing for
it with every feature. It also makes restoring faster since it's just
straight into the data structure.

This is not yet a serializable format. That can be done in a follow up.

We also need to vet that each step makes sense. Notably stylesToHoist is
a bit unclear how it'll work.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
…27268)

This exposes a `resume()` API to go with the `prerender()` (only in
experimental). It doesn't work yet since we don't yet emit the postponed
state so not yet tested.

The main thing this does is rename ResponseState->RenderState and
Resources->ResumableState. We separated out resources into a separate
concept preemptively since it seemed like separate enough but probably
doesn't warrant being a separate concept. The result is that we have a
per RenderState in the Config which is really just temporary state and
things that must be flushed completely in the prerender. Most things
should be ResumableState.

Most options are specified in the `prerender()` and transferred into the
`resume()` but certain options that are unique per request can't be.
Notably `nonce` is special. This means that bootstrap scripts and
external runtime can't use `nonce` in this mode. They need to have a CSP
configured to deal with external scripts, but not inline.

We need to be able to restore state of things that we've already emitted
in the prerender. We could have separate snapshot/restore methods that
does this work when it happens but that means we have to explicitly do
that work. This design is trying to keep to the principle that we just
work with resumable data structures instead so that we're designing for
it with every feature. It also makes restoring faster since it's just
straight into the data structure.

This is not yet a serializable format. That can be done in a follow up.

We also need to vet that each step makes sense. Notably stylesToHoist is
a bit unclear how it'll work.

DiffTrain build for commit 31034b6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants