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

[Float][Flight] Flight support for Float #26502

Merged
merged 1 commit into from
Apr 22, 2023
Merged

Conversation

gnoff
Copy link
Collaborator

@gnoff gnoff commented Mar 29, 2023

Stacked on #26557

Supporting Float methods such as ReactDOM.preload() are challenging for flight because it does not have an easy means to convey direct executions in other environments. Because the flight wire format is a JSON-like serialization that is expected to be rendered it currently only describes renderable elements. We need a way to convey a function invocation that gets run in the context of the client environment whether that is Fizz or Fiber.

Fiber is somewhat straightforward because the HostDispatcher is always active and we can just have the FlightClient dispatch the serialized directive.

Fizz is much more challenging becaue the dispatcher is always scoped but the specific request the dispatch belongs to is not readily available. Environments that support AsyncLocalStorage (or in the future AsyncContext) we will use this to be able to resolve directives in Fizz to the appropriate Request. For other environments directives will be elided. Right now this is pragmatic and non-breaking because all directives are opportunistic and non-critical. If this changes in the future we will need to reconsider how widespread support for async context tracking is.

For Flight, if AsyncLocalStorage is available Float methods can be called before and after await points and be expected to work. If AsyncLocalStorage is not available float methods called in the sync phase of a component render will be captured but anything after an await point will be a noop. If a float call is dropped in this manner a DEV warning should help you realize your code may need to be modified.

This PR also introduces a way for resources (Fizz) and hints (Flight) to flush even if there is not active task being worked on. This will help when Float methods are called in between async points within a function execution but the task is blocked on the entire function finishing.

This PR also introduces deduping of Hints in Flight using the same resource keys used in Fizz. This will help shrink payload sizes when the same hint is attempted to emit over and over again

@gnoff gnoff requested a review from sebmarkbage March 29, 2023 04:59
@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label Mar 29, 2023
@gnoff gnoff force-pushed the float-flight branch 2 times, most recently from 8622483 to b880f09 Compare April 6, 2023 00:01
@react-sizebot
Copy link

react-sizebot commented Apr 6, 2023

Comparing: fd3fb8e...54f91f1

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 = 163.96 kB 163.93 kB +0.01% 51.67 kB 51.68 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 168.30 kB 168.27 kB +0.02% 52.93 kB 52.94 kB
facebook-www/ReactDOM-prod.classic.js +0.02% 567.77 kB 567.85 kB +0.02% 100.57 kB 100.59 kB
facebook-www/ReactDOM-prod.modern.js +0.02% 551.50 kB 551.59 kB +0.02% 97.90 kB 97.92 kB
oss-stable-semver/react-dom/cjs/react-dom-server-rendering-stub.development.js +21.96% 2.92 kB 3.57 kB +28.31% 0.92 kB 1.18 kB
oss-stable/react-dom/cjs/react-dom-server-rendering-stub.development.js +21.78% 2.95 kB 3.59 kB +28.04% 0.95 kB 1.21 kB
oss-experimental/react-dom/cjs/react-dom-server-rendering-stub.development.js +21.72% 2.96 kB 3.60 kB +27.89% 0.95 kB 1.22 kB
oss-stable-semver/react-dom/umd/react-dom-server-rendering-stub.development.js +20.47% 3.30 kB 3.98 kB +25.95% 1.03 kB 1.30 kB
oss-stable/react-dom/umd/react-dom-server-rendering-stub.development.js +20.32% 3.33 kB 4.00 kB +25.55% 1.05 kB 1.32 kB
oss-experimental/react-dom/umd/react-dom-server-rendering-stub.development.js +20.28% 3.33 kB 4.01 kB +25.35% 1.06 kB 1.33 kB
facebook-www/ReactFlightDOMRelayServer-prod.classic.js +10.07% 31.70 kB 34.89 kB +7.29% 7.50 kB 8.05 kB
facebook-www/ReactFlightDOMRelayServer-prod.modern.js +10.07% 31.70 kB 34.89 kB +7.29% 7.50 kB 8.05 kB
facebook-www/ReactFlightDOMRelayClient-prod.classic.js +9.17% 12.41 kB 13.54 kB +6.17% 3.18 kB 3.37 kB
facebook-www/ReactFlightDOMRelayClient-prod.modern.js +9.17% 12.41 kB 13.54 kB +6.17% 3.18 kB 3.37 kB
facebook-www/ReactFlightDOMRelayClient-dev.classic.js +8.75% 20.69 kB 22.50 kB +5.31% 5.37 kB 5.65 kB
facebook-www/ReactFlightDOMRelayClient-dev.modern.js +8.75% 20.69 kB 22.50 kB +5.31% 5.37 kB 5.65 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +7.19% 24.82 kB 26.61 kB +4.72% 6.49 kB 6.80 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +7.19% 24.82 kB 26.61 kB +4.72% 6.49 kB 6.80 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +7.19% 24.82 kB 26.61 kB +4.72% 6.49 kB 6.80 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js +6.95% 19.74 kB 21.11 kB +5.43% 7.13 kB 7.51 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js +6.95% 19.74 kB 21.11 kB +5.43% 7.13 kB 7.51 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js +6.95% 19.74 kB 21.11 kB +5.43% 7.13 kB 7.51 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +6.95% 20.03 kB 21.42 kB +5.39% 7.22 kB 7.61 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +6.95% 20.03 kB 21.42 kB +5.39% 7.22 kB 7.61 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +6.95% 20.03 kB 21.42 kB +5.39% 7.22 kB 7.61 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js +6.87% 19.95 kB 21.32 kB +4.88% 7.25 kB 7.60 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js +6.87% 19.95 kB 21.32 kB +4.88% 7.25 kB 7.60 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js +6.87% 19.95 kB 21.32 kB +4.88% 7.25 kB 7.60 kB
facebook-www/ReactFlightDOMRelayServer-dev.classic.js +6.85% 61.97 kB 66.22 kB +4.53% 15.05 kB 15.73 kB
facebook-www/ReactFlightDOMRelayServer-dev.modern.js +6.85% 61.97 kB 66.22 kB +4.53% 15.05 kB 15.73 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +6.78% 20.80 kB 22.21 kB +5.00% 7.49 kB 7.87 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +6.78% 20.80 kB 22.21 kB +5.00% 7.49 kB 7.87 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +6.78% 20.80 kB 22.21 kB +5.00% 7.49 kB 7.87 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +6.77% 26.36 kB 28.14 kB +4.35% 6.94 kB 7.24 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +6.77% 26.36 kB 28.14 kB +4.35% 6.94 kB 7.24 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +6.77% 26.36 kB 28.14 kB +4.35% 6.94 kB 7.24 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +6.71% 26.57 kB 28.36 kB +4.36% 7.02 kB 7.32 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +6.71% 26.57 kB 28.36 kB +4.36% 7.02 kB 7.32 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +6.71% 26.57 kB 28.36 kB +4.36% 7.02 kB 7.32 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js +6.60% 21.37 kB 22.78 kB +4.89% 7.68 kB 8.06 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js +6.60% 21.37 kB 22.78 kB +4.89% 7.68 kB 8.06 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js +6.60% 21.37 kB 22.78 kB +4.89% 7.68 kB 8.06 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +5.18% 6.78 kB 7.13 kB +4.20% 2.71 kB 2.83 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +5.18% 6.78 kB 7.13 kB +4.20% 2.71 kB 2.83 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +5.18% 6.78 kB 7.13 kB +4.20% 2.71 kB 2.83 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js +5.05% 88.79 kB 93.28 kB +3.59% 21.05 kB 21.81 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js +5.05% 88.79 kB 93.28 kB +3.59% 21.05 kB 21.81 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js +5.05% 88.79 kB 93.28 kB +3.59% 21.05 kB 21.81 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +4.98% 84.02 kB 88.20 kB +3.50% 20.74 kB 21.46 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +4.98% 84.02 kB 88.20 kB +3.50% 20.74 kB 21.46 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +4.98% 84.02 kB 88.20 kB +3.50% 20.74 kB 21.46 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +4.93% 7.23 kB 7.58 kB +4.21% 2.95 kB 3.07 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +4.93% 7.23 kB 7.58 kB +4.21% 2.95 kB 3.07 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +4.93% 7.23 kB 7.58 kB +4.21% 2.95 kB 3.07 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +4.91% 7.15 kB 7.50 kB +3.83% 2.90 kB 3.01 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +4.91% 7.15 kB 7.50 kB +3.83% 2.90 kB 3.01 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +4.91% 7.15 kB 7.50 kB +3.83% 2.90 kB 3.01 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +4.85% 84.51 kB 88.61 kB +3.39% 20.87 kB 21.58 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +4.85% 84.51 kB 88.61 kB +3.39% 20.87 kB 21.58 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +4.85% 84.51 kB 88.61 kB +3.39% 20.87 kB 21.58 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +4.74% 86.58 kB 90.69 kB +3.20% 20.99 kB 21.66 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +4.74% 86.58 kB 90.69 kB +3.20% 20.99 kB 21.66 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +4.74% 86.58 kB 90.69 kB +3.20% 20.99 kB 21.66 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +4.61% 88.90 kB 93.00 kB +3.15% 21.66 kB 22.34 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +4.61% 88.90 kB 93.00 kB +3.15% 21.66 kB 22.34 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +4.61% 88.90 kB 93.00 kB +3.15% 21.66 kB 22.34 kB
oss-experimental/react-server/cjs/react-server-flight.production.min.js +3.89% 15.47 kB 16.07 kB +2.57% 5.65 kB 5.80 kB
oss-stable-semver/react-server/cjs/react-server-flight.production.min.js +3.89% 15.47 kB 16.07 kB +2.57% 5.65 kB 5.80 kB
oss-stable/react-server/cjs/react-server-flight.production.min.js +3.89% 15.47 kB 16.07 kB +2.57% 5.65 kB 5.80 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +3.89% 9.70 kB 10.07 kB +3.08% 3.86 kB 3.98 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +3.89% 9.70 kB 10.07 kB +3.08% 3.86 kB 3.98 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +3.89% 9.70 kB 10.07 kB +3.08% 3.86 kB 3.98 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +3.83% 50.03 kB 51.95 kB +2.53% 11.84 kB 12.14 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +3.83% 50.03 kB 51.95 kB +2.53% 11.84 kB 12.14 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +3.83% 50.03 kB 51.95 kB +2.53% 11.84 kB 12.14 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +3.79% 47.07 kB 48.86 kB +2.54% 11.65 kB 11.95 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +3.79% 47.07 kB 48.86 kB +2.54% 11.65 kB 11.95 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +3.79% 47.07 kB 48.86 kB +2.54% 11.65 kB 11.95 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +3.74% 9.46 kB 9.81 kB +3.18% 3.75 kB 3.87 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +3.74% 9.46 kB 9.81 kB +3.18% 3.75 kB 3.87 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +3.74% 9.46 kB 9.81 kB +3.18% 3.75 kB 3.87 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-flight-server.production.min.js +2.85% 1.23 kB 1.26 kB +2.77% 0.58 kB 0.59 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-flight-server.production.min.js +2.85% 1.23 kB 1.26 kB +2.77% 0.58 kB 0.59 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-flight-server.production.min.js +2.85% 1.23 kB 1.26 kB +2.77% 0.58 kB 0.59 kB
oss-experimental/react-server/cjs/react-server-flight.development.js +2.18% 64.57 kB 65.98 kB +1.48% 15.65 kB 15.88 kB
oss-stable-semver/react-server/cjs/react-server-flight.development.js +2.18% 64.57 kB 65.98 kB +1.48% 15.65 kB 15.88 kB
oss-stable/react-server/cjs/react-server-flight.development.js +2.18% 64.57 kB 65.98 kB +1.48% 15.65 kB 15.88 kB
oss-experimental/react-dom/umd/react-dom-server-rendering-stub.production.min.js = 1.49 kB 1.40 kB +0.75% 0.80 kB 0.81 kB
oss-stable/react-dom/umd/react-dom-server-rendering-stub.production.min.js = 1.48 kB 1.39 kB +0.63% 0.80 kB 0.80 kB
oss-stable-semver/react-dom/umd/react-dom-server-rendering-stub.production.min.js = 1.46 kB 1.37 kB +0.26% 0.78 kB 0.78 kB
oss-experimental/react-dom/cjs/react-dom-server-rendering-stub.production.min.js = 1.26 kB 1.18 kB +1.48% 0.68 kB 0.69 kB
oss-stable/react-dom/cjs/react-dom-server-rendering-stub.production.min.js = 1.26 kB 1.17 kB +1.49% 0.67 kB 0.68 kB
oss-stable-semver/react-dom/cjs/react-dom-server-rendering-stub.production.min.js = 1.23 kB 1.15 kB +1.23% 0.65 kB 0.66 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/react-dom/cjs/react-dom-server-rendering-stub.development.js +21.96% 2.92 kB 3.57 kB +28.31% 0.92 kB 1.18 kB
oss-stable/react-dom/cjs/react-dom-server-rendering-stub.development.js +21.78% 2.95 kB 3.59 kB +28.04% 0.95 kB 1.21 kB
oss-experimental/react-dom/cjs/react-dom-server-rendering-stub.development.js +21.72% 2.96 kB 3.60 kB +27.89% 0.95 kB 1.22 kB
oss-stable-semver/react-dom/umd/react-dom-server-rendering-stub.development.js +20.47% 3.30 kB 3.98 kB +25.95% 1.03 kB 1.30 kB
oss-stable/react-dom/umd/react-dom-server-rendering-stub.development.js +20.32% 3.33 kB 4.00 kB +25.55% 1.05 kB 1.32 kB
oss-experimental/react-dom/umd/react-dom-server-rendering-stub.development.js +20.28% 3.33 kB 4.01 kB +25.35% 1.06 kB 1.33 kB
facebook-www/ReactFlightDOMRelayServer-prod.classic.js +10.07% 31.70 kB 34.89 kB +7.29% 7.50 kB 8.05 kB
facebook-www/ReactFlightDOMRelayServer-prod.modern.js +10.07% 31.70 kB 34.89 kB +7.29% 7.50 kB 8.05 kB
facebook-www/ReactFlightDOMRelayClient-prod.classic.js +9.17% 12.41 kB 13.54 kB +6.17% 3.18 kB 3.37 kB
facebook-www/ReactFlightDOMRelayClient-prod.modern.js +9.17% 12.41 kB 13.54 kB +6.17% 3.18 kB 3.37 kB
facebook-www/ReactFlightDOMRelayClient-dev.classic.js +8.75% 20.69 kB 22.50 kB +5.31% 5.37 kB 5.65 kB
facebook-www/ReactFlightDOMRelayClient-dev.modern.js +8.75% 20.69 kB 22.50 kB +5.31% 5.37 kB 5.65 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +7.19% 24.82 kB 26.61 kB +4.72% 6.49 kB 6.80 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +7.19% 24.82 kB 26.61 kB +4.72% 6.49 kB 6.80 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +7.19% 24.82 kB 26.61 kB +4.72% 6.49 kB 6.80 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js +6.95% 19.74 kB 21.11 kB +5.43% 7.13 kB 7.51 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js +6.95% 19.74 kB 21.11 kB +5.43% 7.13 kB 7.51 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js +6.95% 19.74 kB 21.11 kB +5.43% 7.13 kB 7.51 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +6.95% 20.03 kB 21.42 kB +5.39% 7.22 kB 7.61 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +6.95% 20.03 kB 21.42 kB +5.39% 7.22 kB 7.61 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +6.95% 20.03 kB 21.42 kB +5.39% 7.22 kB 7.61 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js +6.87% 19.95 kB 21.32 kB +4.88% 7.25 kB 7.60 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js +6.87% 19.95 kB 21.32 kB +4.88% 7.25 kB 7.60 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js +6.87% 19.95 kB 21.32 kB +4.88% 7.25 kB 7.60 kB
facebook-www/ReactFlightDOMRelayServer-dev.classic.js +6.85% 61.97 kB 66.22 kB +4.53% 15.05 kB 15.73 kB
facebook-www/ReactFlightDOMRelayServer-dev.modern.js +6.85% 61.97 kB 66.22 kB +4.53% 15.05 kB 15.73 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +6.78% 20.80 kB 22.21 kB +5.00% 7.49 kB 7.87 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +6.78% 20.80 kB 22.21 kB +5.00% 7.49 kB 7.87 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +6.78% 20.80 kB 22.21 kB +5.00% 7.49 kB 7.87 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +6.77% 26.36 kB 28.14 kB +4.35% 6.94 kB 7.24 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +6.77% 26.36 kB 28.14 kB +4.35% 6.94 kB 7.24 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +6.77% 26.36 kB 28.14 kB +4.35% 6.94 kB 7.24 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +6.71% 26.57 kB 28.36 kB +4.36% 7.02 kB 7.32 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +6.71% 26.57 kB 28.36 kB +4.36% 7.02 kB 7.32 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +6.71% 26.57 kB 28.36 kB +4.36% 7.02 kB 7.32 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js +6.60% 21.37 kB 22.78 kB +4.89% 7.68 kB 8.06 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js +6.60% 21.37 kB 22.78 kB +4.89% 7.68 kB 8.06 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js +6.60% 21.37 kB 22.78 kB +4.89% 7.68 kB 8.06 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +5.18% 6.78 kB 7.13 kB +4.20% 2.71 kB 2.83 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +5.18% 6.78 kB 7.13 kB +4.20% 2.71 kB 2.83 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +5.18% 6.78 kB 7.13 kB +4.20% 2.71 kB 2.83 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js +5.05% 88.79 kB 93.28 kB +3.59% 21.05 kB 21.81 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js +5.05% 88.79 kB 93.28 kB +3.59% 21.05 kB 21.81 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js +5.05% 88.79 kB 93.28 kB +3.59% 21.05 kB 21.81 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +4.98% 84.02 kB 88.20 kB +3.50% 20.74 kB 21.46 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +4.98% 84.02 kB 88.20 kB +3.50% 20.74 kB 21.46 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +4.98% 84.02 kB 88.20 kB +3.50% 20.74 kB 21.46 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +4.93% 7.23 kB 7.58 kB +4.21% 2.95 kB 3.07 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +4.93% 7.23 kB 7.58 kB +4.21% 2.95 kB 3.07 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +4.93% 7.23 kB 7.58 kB +4.21% 2.95 kB 3.07 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +4.91% 7.15 kB 7.50 kB +3.83% 2.90 kB 3.01 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +4.91% 7.15 kB 7.50 kB +3.83% 2.90 kB 3.01 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +4.91% 7.15 kB 7.50 kB +3.83% 2.90 kB 3.01 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +4.85% 84.51 kB 88.61 kB +3.39% 20.87 kB 21.58 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +4.85% 84.51 kB 88.61 kB +3.39% 20.87 kB 21.58 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +4.85% 84.51 kB 88.61 kB +3.39% 20.87 kB 21.58 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +4.74% 86.58 kB 90.69 kB +3.20% 20.99 kB 21.66 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +4.74% 86.58 kB 90.69 kB +3.20% 20.99 kB 21.66 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +4.74% 86.58 kB 90.69 kB +3.20% 20.99 kB 21.66 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +4.61% 88.90 kB 93.00 kB +3.15% 21.66 kB 22.34 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +4.61% 88.90 kB 93.00 kB +3.15% 21.66 kB 22.34 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +4.61% 88.90 kB 93.00 kB +3.15% 21.66 kB 22.34 kB
oss-experimental/react-server/cjs/react-server-flight.production.min.js +3.89% 15.47 kB 16.07 kB +2.57% 5.65 kB 5.80 kB
oss-stable-semver/react-server/cjs/react-server-flight.production.min.js +3.89% 15.47 kB 16.07 kB +2.57% 5.65 kB 5.80 kB
oss-stable/react-server/cjs/react-server-flight.production.min.js +3.89% 15.47 kB 16.07 kB +2.57% 5.65 kB 5.80 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +3.89% 9.70 kB 10.07 kB +3.08% 3.86 kB 3.98 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +3.89% 9.70 kB 10.07 kB +3.08% 3.86 kB 3.98 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +3.89% 9.70 kB 10.07 kB +3.08% 3.86 kB 3.98 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +3.83% 50.03 kB 51.95 kB +2.53% 11.84 kB 12.14 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +3.83% 50.03 kB 51.95 kB +2.53% 11.84 kB 12.14 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +3.83% 50.03 kB 51.95 kB +2.53% 11.84 kB 12.14 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +3.79% 47.07 kB 48.86 kB +2.54% 11.65 kB 11.95 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +3.79% 47.07 kB 48.86 kB +2.54% 11.65 kB 11.95 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +3.79% 47.07 kB 48.86 kB +2.54% 11.65 kB 11.95 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +3.74% 9.46 kB 9.81 kB +3.18% 3.75 kB 3.87 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +3.74% 9.46 kB 9.81 kB +3.18% 3.75 kB 3.87 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +3.74% 9.46 kB 9.81 kB +3.18% 3.75 kB 3.87 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-flight-server.production.min.js +2.85% 1.23 kB 1.26 kB +2.77% 0.58 kB 0.59 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-flight-server.production.min.js +2.85% 1.23 kB 1.26 kB +2.77% 0.58 kB 0.59 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-flight-server.production.min.js +2.85% 1.23 kB 1.26 kB +2.77% 0.58 kB 0.59 kB
oss-experimental/react-server/cjs/react-server-flight.development.js +2.18% 64.57 kB 65.98 kB +1.48% 15.65 kB 15.88 kB
oss-stable-semver/react-server/cjs/react-server-flight.development.js +2.18% 64.57 kB 65.98 kB +1.48% 15.65 kB 15.88 kB
oss-stable/react-server/cjs/react-server-flight.development.js +2.18% 64.57 kB 65.98 kB +1.48% 15.65 kB 15.88 kB
facebook-relay/flight/ReactFlightNativeRelayServer-prod.js +1.77% 31.61 kB 32.17 kB +2.16% 7.50 kB 7.67 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-flight-server.development.js +1.74% 2.35 kB 2.39 kB +2.22% 0.90 kB 0.92 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-flight-server.development.js +1.74% 2.35 kB 2.39 kB +2.22% 0.90 kB 0.92 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-flight-server.development.js +1.74% 2.35 kB 2.39 kB +2.22% 0.90 kB 0.92 kB
oss-stable-semver/react-server/cjs/react-server.production.min.js +1.44% 24.41 kB 24.76 kB +1.00% 8.37 kB 8.46 kB
oss-stable/react-server/cjs/react-server.production.min.js +1.44% 24.41 kB 24.76 kB +1.00% 8.37 kB 8.46 kB
oss-experimental/react-server/cjs/react-server.production.min.js +1.43% 24.66 kB 25.01 kB +0.97% 8.46 kB 8.55 kB
oss-experimental/react-client/cjs/react-client-flight.development.js +1.37% 22.84 kB 23.15 kB +1.07% 6.05 kB 6.11 kB
oss-stable-semver/react-client/cjs/react-client-flight.development.js +1.37% 22.84 kB 23.15 kB +1.07% 6.05 kB 6.11 kB
oss-stable/react-client/cjs/react-client-flight.development.js +1.37% 22.84 kB 23.15 kB +1.07% 6.05 kB 6.11 kB
oss-experimental/react-client/cjs/react-client-flight.production.min.js +1.28% 6.24 kB 6.32 kB +1.36% 2.49 kB 2.53 kB
oss-stable-semver/react-client/cjs/react-client-flight.production.min.js +1.28% 6.24 kB 6.32 kB +1.36% 2.49 kB 2.53 kB
oss-stable/react-client/cjs/react-client-flight.production.min.js +1.28% 6.24 kB 6.32 kB +1.36% 2.49 kB 2.53 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.production.min.js +1.08% 59.04 kB 59.68 kB +0.63% 18.05 kB 18.16 kB
facebook-relay/flight/ReactFlightNativeRelayServer-dev.js +1.02% 61.94 kB 62.57 kB +0.46% 15.10 kB 15.17 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.production.min.js +1.02% 62.49 kB 63.12 kB +0.49% 19.24 kB 19.33 kB
oss-stable/react-dom/cjs/react-dom-server.edge.production.min.js +1.02% 62.51 kB 63.15 kB +0.49% 19.26 kB 19.36 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.production.min.js +1.01% 63.00 kB 63.64 kB +0.56% 19.43 kB 19.54 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.production.min.js +0.92% 62.70 kB 63.27 kB +0.35% 19.27 kB 19.34 kB
oss-stable/react-dom/cjs/react-dom-server.node.production.min.js +0.92% 62.72 kB 63.30 kB +0.36% 19.29 kB 19.36 kB
oss-experimental/react-dom/cjs/react-dom-static.node.production.min.js +0.91% 63.17 kB 63.75 kB +0.41% 19.50 kB 19.58 kB
oss-experimental/react-dom/cjs/react-dom-server.node.production.min.js +0.91% 63.21 kB 63.78 kB +0.37% 19.45 kB 19.52 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +0.84% 57.81 kB 58.30 kB +0.26% 17.03 kB 17.07 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +0.84% 57.84 kB 58.32 kB +0.26% 17.05 kB 17.09 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.production.min.js +0.84% 62.38 kB 62.91 kB +0.39% 18.49 kB 18.56 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.production.min.js +0.84% 62.41 kB 62.93 kB +0.41% 18.51 kB 18.58 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +0.83% 58.27 kB 58.76 kB +0.33% 17.18 kB 17.24 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.production.min.js +0.83% 62.91 kB 63.43 kB +0.42% 18.67 kB 18.74 kB
oss-stable-semver/react-dom/umd/react-dom-server-legacy.browser.production.min.js +0.83% 57.98 kB 58.46 kB +0.40% 17.26 kB 17.33 kB
oss-stable/react-dom/umd/react-dom-server-legacy.browser.production.min.js +0.83% 58.01 kB 58.49 kB +0.41% 17.28 kB 17.35 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.production.min.js +0.83% 58.53 kB 59.02 kB +0.27% 17.90 kB 17.95 kB
oss-stable/react-dom/cjs/react-dom-server.browser.production.min.js +0.83% 58.56 kB 59.04 kB +0.28% 17.92 kB 17.97 kB
oss-experimental/react-dom/umd/react-dom-server-legacy.browser.production.min.js +0.82% 58.44 kB 58.92 kB +0.45% 17.39 kB 17.47 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.production.min.js +0.82% 58.86 kB 59.35 kB +0.32% 18.00 kB 18.06 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.production.min.js +0.82% 58.98 kB 59.47 kB +0.35% 18.04 kB 18.11 kB
oss-stable-semver/react-dom/umd/react-dom-server.browser.production.min.js +0.82% 58.70 kB 59.18 kB +0.34% 18.10 kB 18.17 kB
oss-stable/react-dom/umd/react-dom-server.browser.production.min.js +0.82% 58.73 kB 59.21 kB +0.36% 18.12 kB 18.19 kB
oss-experimental/react-dom/umd/react-dom-server.browser.production.min.js +0.81% 59.15 kB 59.63 kB +0.23% 18.26 kB 18.31 kB
facebook-www/ReactDOMServer-prod.modern.js +0.79% 132.76 kB 133.81 kB +0.44% 24.86 kB 24.97 kB
oss-stable-semver/react-dom/cjs/react-dom-server.bun.production.min.js +0.79% 61.36 kB 61.84 kB +0.30% 18.45 kB 18.50 kB
oss-stable/react-dom/cjs/react-dom-server.bun.production.min.js +0.79% 61.38 kB 61.87 kB +0.30% 18.47 kB 18.52 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.production.min.js +0.78% 61.88 kB 62.37 kB +0.30% 18.62 kB 18.68 kB
facebook-www/ReactDOMServer-prod.classic.js +0.77% 136.32 kB 137.38 kB +0.47% 25.56 kB 25.68 kB
facebook-www/ReactDOMServerStreaming-prod.modern.js +0.76% 137.63 kB 138.67 kB +0.35% 26.13 kB 26.22 kB
oss-stable-semver/react-server/cjs/react-server.development.js +0.69% 144.87 kB 145.87 kB +0.57% 36.17 kB 36.37 kB
oss-stable/react-server/cjs/react-server.development.js +0.69% 144.87 kB 145.87 kB +0.57% 36.17 kB 36.37 kB
oss-experimental/react-server/cjs/react-server.development.js +0.69% 145.53 kB 146.53 kB +0.56% 36.36 kB 36.57 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.development.js +0.53% 355.65 kB 357.54 kB +0.42% 78.93 kB 79.26 kB
oss-stable/react-dom/cjs/react-dom-server.edge.development.js +0.53% 355.67 kB 357.56 kB +0.43% 78.95 kB 79.28 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.development.js +0.52% 360.43 kB 362.32 kB +0.42% 79.98 kB 80.31 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.development.js +0.52% 361.12 kB 363.01 kB +0.42% 80.16 kB 80.50 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.development.js +0.49% 356.88 kB 358.63 kB +0.40% 78.88 kB 79.20 kB
oss-stable/react-dom/cjs/react-dom-server.node.development.js +0.49% 356.91 kB 358.66 kB +0.40% 78.90 kB 79.22 kB
oss-experimental/react-dom/cjs/react-dom-static.node.development.js +0.48% 362.31 kB 364.06 kB +0.40% 80.20 kB 80.52 kB
oss-experimental/react-dom/cjs/react-dom-server.node.development.js +0.48% 362.35 kB 364.10 kB +0.39% 80.12 kB 80.43 kB
oss-stable-semver/react-dom/cjs/react-dom-server.bun.development.js +0.46% 353.34 kB 354.95 kB +0.35% 78.21 kB 78.48 kB
oss-stable/react-dom/cjs/react-dom-server.bun.development.js +0.46% 353.36 kB 354.98 kB +0.35% 78.23 kB 78.50 kB
oss-stable-semver/react-dom/umd/react-dom-server.browser.development.js +0.46% 372.41 kB 374.11 kB +0.32% 79.79 kB 80.05 kB
oss-stable/react-dom/umd/react-dom-server.browser.development.js +0.46% 372.44 kB 374.14 kB +0.33% 79.81 kB 80.07 kB
oss-stable-semver/react-dom/umd/react-dom-server-legacy.browser.development.js +0.46% 373.26 kB 374.96 kB +0.31% 79.68 kB 79.93 kB
oss-stable/react-dom/umd/react-dom-server-legacy.browser.development.js +0.46% 373.28 kB 374.98 kB +0.31% 79.70 kB 79.95 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.development.js +0.46% 355.51 kB 357.13 kB +0.34% 78.88 kB 79.15 kB
oss-stable/react-dom/cjs/react-dom-server.browser.development.js +0.46% 355.54 kB 357.15 kB +0.35% 78.90 kB 79.17 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.development.js +0.45% 356.34 kB 357.96 kB +0.34% 78.80 kB 79.07 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.development.js +0.45% 356.36 kB 357.98 kB +0.34% 78.82 kB 79.09 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.development.js +0.45% 358.10 kB 359.72 kB +0.33% 79.26 kB 79.53 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.development.js +0.45% 358.12 kB 359.74 kB +0.34% 79.28 kB 79.55 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.development.js +0.45% 358.81 kB 360.43 kB +0.33% 79.43 kB 79.70 kB
oss-experimental/react-dom/umd/react-dom-server.browser.development.js +0.45% 378.11 kB 379.81 kB +0.33% 80.97 kB 81.24 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.development.js +0.45% 360.29 kB 361.91 kB +0.33% 79.93 kB 80.20 kB
oss-experimental/react-dom/umd/react-dom-server-legacy.browser.development.js +0.45% 378.95 kB 380.65 kB +0.34% 80.86 kB 81.13 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.development.js +0.45% 360.98 kB 362.60 kB +0.33% 80.11 kB 80.38 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.development.js +0.45% 361.81 kB 363.43 kB +0.34% 80.03 kB 80.30 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.development.js +0.45% 363.57 kB 365.19 kB +0.33% 80.49 kB 80.76 kB
facebook-www/ReactDOMServer-dev.modern.js +0.44% 370.80 kB 372.42 kB +0.34% 80.53 kB 80.81 kB
facebook-www/ReactDOMServer-dev.classic.js +0.43% 378.22 kB 379.85 kB +0.33% 82.15 kB 82.42 kB
facebook-www/ReactDOMServerStreaming-dev.modern.js +0.43% 365.71 kB 367.28 kB +0.33% 79.27 kB 79.53 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-server.development.js = 6.53 kB 6.50 kB = 1.80 kB 1.80 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-server.development.js = 6.53 kB 6.50 kB = 1.80 kB 1.80 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-server.development.js = 6.53 kB 6.50 kB = 1.80 kB 1.80 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-server.production.min.js = 3.26 kB 3.23 kB = 1.23 kB 1.22 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-server.production.min.js = 3.26 kB 3.23 kB = 1.23 kB 1.22 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-server.production.min.js = 3.26 kB 3.23 kB = 1.23 kB 1.22 kB
oss-experimental/react-dom/umd/react-dom-server-rendering-stub.production.min.js = 1.49 kB 1.40 kB +0.75% 0.80 kB 0.81 kB
oss-stable/react-dom/umd/react-dom-server-rendering-stub.production.min.js = 1.48 kB 1.39 kB +0.63% 0.80 kB 0.80 kB
oss-stable-semver/react-dom/umd/react-dom-server-rendering-stub.production.min.js = 1.46 kB 1.37 kB +0.26% 0.78 kB 0.78 kB
oss-experimental/react-dom/cjs/react-dom-server-rendering-stub.production.min.js = 1.26 kB 1.18 kB +1.48% 0.68 kB 0.69 kB
oss-stable/react-dom/cjs/react-dom-server-rendering-stub.production.min.js = 1.26 kB 1.17 kB +1.49% 0.67 kB 0.68 kB
oss-stable-semver/react-dom/cjs/react-dom-server-rendering-stub.production.min.js = 1.23 kB 1.15 kB +1.23% 0.65 kB 0.66 kB

Generated by 🚫 dangerJS against 54f91f1

@gnoff gnoff force-pushed the float-flight branch 2 times, most recently from 2487dd5 to 2365024 Compare April 6, 2023 00:19
@gnoff
Copy link
Collaborator Author

gnoff commented Apr 6, 2023

blew up some package sizes, need to figure out what I'm pulling in that is unexpected

resolved now

@facebook facebook deleted a comment from johndow2here Apr 6, 2023
@gnoff gnoff force-pushed the float-flight branch 5 times, most recently from 1a541ec to 9a6f82e Compare April 11, 2023 16:35
@gnoff gnoff marked this pull request as ready for review April 11, 2023 16:39
@gnoff gnoff force-pushed the float-flight branch 5 times, most recently from d9db635 to 6917df1 Compare April 11, 2023 17:15
@@ -46,6 +47,10 @@ function processFullRow(response: Response, row: string): void {
resolveModule(response, id, row.slice(colon + 2));
return;
}
case 'D': {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here's what I had in mind for typed arrays:

- C - Int8Array (char)
- c - Uint8Array (unsigned char)
- Z - Uint8ClampedArray (unsigned clamped char)
- S - Int16Array (short)
- s - Uint16Array (unsigned short)
- L - Int32Array (long)
- l - Uint32Array (unsigned long)
- F - Float32Array (float)
- D - Float64Array (double)
- N - BigInt64Array (number)
- n - BigUint64Array (unsigned number)
- A - ArrayBuffer

As you can see D represents double in this pattern. I'm not 100% sure this plan will work but can we pick another character?

Copy link
Collaborator

@sebmarkbage sebmarkbage Apr 21, 2023

Choose a reason for hiding this comment

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

It's possible we just end up encoding this in the reference instead though. (Where D is also already used by Date.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think ! is a nice alternative

Copy link
Collaborator

@sebmarkbage sebmarkbage Apr 21, 2023

Choose a reason for hiding this comment

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

Punctuations could apply to everything. Why is this one special? It can't be anything that's in the first character of JSON since that's implicitly a model. So that eliminates [, {, " and numbers. So we quickly run out of punctuators. And since punctuators generally means JSON it's extra confusing.

Let's pick an A-Z character. I think P is open since we now encode Context Providers in the reference.

Although my other question is if we should just encode preload/preconnect/preinit etc into this character instead of the payload.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I picked ! for emphasis that these things should be acted on immediately. A letter is fine though :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We decided to go with H + char to represent Hints of various types.

HD -> prefetchDNS
HC -> preconnect
HL -> preload
HI -> preinit

can support more (up to alphabet limit) which should be more than enough.
Also note there is no longer a general "Directive" concept. these are hints. This will be helpful in allowing for deduping, and specialized re-ordering of hints

@gnoff gnoff force-pushed the float-flight branch 3 times, most recently from 8847629 to 0763c04 Compare April 21, 2023 18:01
@@ -1250,6 +1276,21 @@ function flushCompletedChunks(
}
}
importsChunks.splice(0, i);

// Next comes directives.
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 interesting that these come after JS but in Fizz they don't. Does it make sense that a preconnect or prefetchDNS comes after?

It kind of makes sense that CSS is actually lower pri that JS in the client-only scenario, because you need the JS to render but then you can wait for the CSS at the end with suspensey CSS.

But we don't know this is only CSS.

Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

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

A bunch of nits but mainly the scheduling thing needs to be fixed.

@gnoff gnoff force-pushed the float-flight branch 3 times, most recently from a49e59d to da37fbf Compare April 21, 2023 23:40

// If new resources are identified out of band with a task we can still potentially
// emit them early by pinging them.
export function pingRequest(): void {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Too generic. Unclear what this will mean when it changes.

There are optimizations we can do if we assume that this is resources.

flushResources() maybe? It's not really a sync flush but close enough.

// emit them early by pinging them.
export function pingRequest(): void {
const request = resolveCurrentRequest();
if (request) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If request.destination === null we don't have to schedule work because there's nothing to flush too. That's an assumption we can make because we know we're not going to work on anything.

In fact, really we should probably just be scheduling flushCompletedQueues since we're not doing any work but that's maybe over optimizing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Refactored this a bit. Ended up just flushing queues/chunks because the flush can run outside of the dispatcher and context scoping that happens during performWork so it must not rely on it.

Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

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

Nits

Supporting Float methods such as ReactDOM.preload() are challenging for flight because it does not have an easy means to convey direct executions in other environments. Because the flight wire format is a JSON-like serialization that is expected to be rendered it currently only describes renderable elements. We need a way to convey a function invocation that gets run in the context of the client environment whether that is Fizz or Fiber.

Fiber is somewhat straightforward because the HostDispatcher is always active and we can just have the FlightClient dispatch the serialized directive.

Fizz is much more challenging becaue the dispatcher is always scoped but the specific request the dispatch belongs to is not readily available. Environments that support AsyncLocalStorage (or in the future AsyncContext) we will use this to be able to resolve directives in Fizz to the appropriate Request. For other environments directives will be elided. Right now this is pragmatic and non-breaking because all directives are opportunistic and non-critical. If this changes in the future we will need to reconsider how widespread support for async context tracking is.

For Flight, if AsyncLocalStorage is available Float methods can be called before and after await points and be expected to work. If AsyncLocalStorage is not available float methods called in the sync phase of a component render will be captured but anything after an await point will be a noop. If a float call is dropped in this manner a DEV warning should help you realize your code may need to be modified.
@gnoff gnoff merged commit 36e4cbe into facebook:main Apr 22, 2023
@gnoff gnoff deleted the float-flight branch April 22, 2023 03:45
shuding added a commit to vercel/next.js that referenced this pull request Apr 27, 2023
This PR implements preloading of CSS from RSC.

1. The underlying Flight protocol was extended in
facebook/react#26502 to allow sending hints from
RSC to SSR and Client runtimes. React was updated to include these
changes.
2. We now call `ReactDOM.preload()` for each stylesheet used in a
layout/page layer

There are a few implementation details to take note of
1. we were previously using the `.browser` variant of a few React
packages. This was a holdover from when there was just browser and node
and we wanted to use the browser variant b/c we wanted the same code to
work in edge/node runtimes. React now publishes a `.edge` variant which
is like `.browser` but expects to be server only. This is necessary to
get the opt-in for `AsyncLocalStorage`.
2. Even with the above change, AsyncLocalStorage was not patched on the
global scope until after React was loaded. I moved this into a module
which is loaded first
3. The component passed to RSC's `renderToReadableStream` is not
actually part of the RSC module graph. If I tried to call
`ReactDOM.preload()` inside that function or any other function defined
inside `app-render.tsx` file it would actually see the wrong instance of
`react-dom`. I added a new export on the RSC top level export which
exposes a `preloadStyle(...)` function which just delegates to
`ReactDOM.preload(...)`. This makes the preload run in the right module
graph


~There are a couple of bugs in React that this work uncovered that I
will upstream. We may want to delay merging until they are addressed.
I'll update this comment when that is complete.~
1. ~React, during SSR, can emit a preload for a style twice in some
circumstances because late discovered stylesheets don't consider whether
a preload has already been flushed when preparing to reveal a boundary
they are within~
2. ~React, during RSC updates on the client, can preload a style that is
already in the document because it currently only looks for existing
preload links and does not consider if there is a stylesheet link with
the same href.~

~both of these issues will not break functionality, they just make the
network tab look at bit more noisy. We would expect network deduping to
prevent multiple actual loads~

The above React bugs were fixed and included now in the React update in
this PR

---------

Co-authored-by: Shu Ding <g@shud.in>
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
Stacked on facebook#26557 

Supporting Float methods such as ReactDOM.preload() are challenging for
flight because it does not have an easy means to convey direct
executions in other environments. Because the flight wire format is a
JSON-like serialization that is expected to be rendered it currently
only describes renderable elements. We need a way to convey a function
invocation that gets run in the context of the client environment
whether that is Fizz or Fiber.

Fiber is somewhat straightforward because the HostDispatcher is always
active and we can just have the FlightClient dispatch the serialized
directive.

Fizz is much more challenging becaue the dispatcher is always scoped but
the specific request the dispatch belongs to is not readily available.
Environments that support AsyncLocalStorage (or in the future
AsyncContext) we will use this to be able to resolve directives in Fizz
to the appropriate Request. For other environments directives will be
elided. Right now this is pragmatic and non-breaking because all
directives are opportunistic and non-critical. If this changes in the
future we will need to reconsider how widespread support for async
context tracking is.

For Flight, if AsyncLocalStorage is available Float methods can be
called before and after await points and be expected to work. If
AsyncLocalStorage is not available float methods called in the sync
phase of a component render will be captured but anything after an await
point will be a noop. If a float call is dropped in this manner a DEV
warning should help you realize your code may need to be modified.

This PR also introduces a way for resources (Fizz) and hints (Flight) to
flush even if there is not active task being worked on. This will help
when Float methods are called in between async points within a function
execution but the task is blocked on the entire function finishing.

This PR also introduces deduping of Hints in Flight using the same
resource keys used in Fizz. This will help shrink payload sizes when the
same hint is attempted to emit over and over again
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
Stacked on #26557

Supporting Float methods such as ReactDOM.preload() are challenging for
flight because it does not have an easy means to convey direct
executions in other environments. Because the flight wire format is a
JSON-like serialization that is expected to be rendered it currently
only describes renderable elements. We need a way to convey a function
invocation that gets run in the context of the client environment
whether that is Fizz or Fiber.

Fiber is somewhat straightforward because the HostDispatcher is always
active and we can just have the FlightClient dispatch the serialized
directive.

Fizz is much more challenging becaue the dispatcher is always scoped but
the specific request the dispatch belongs to is not readily available.
Environments that support AsyncLocalStorage (or in the future
AsyncContext) we will use this to be able to resolve directives in Fizz
to the appropriate Request. For other environments directives will be
elided. Right now this is pragmatic and non-breaking because all
directives are opportunistic and non-critical. If this changes in the
future we will need to reconsider how widespread support for async
context tracking is.

For Flight, if AsyncLocalStorage is available Float methods can be
called before and after await points and be expected to work. If
AsyncLocalStorage is not available float methods called in the sync
phase of a component render will be captured but anything after an await
point will be a noop. If a float call is dropped in this manner a DEV
warning should help you realize your code may need to be modified.

This PR also introduces a way for resources (Fizz) and hints (Flight) to
flush even if there is not active task being worked on. This will help
when Float methods are called in between async points within a function
execution but the task is blocked on the entire function finishing.

This PR also introduces deduping of Hints in Flight using the same
resource keys used in Fizz. This will help shrink payload sizes when the
same hint is attempted to emit over and over again

DiffTrain build for commit 36e4cbe.
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.

5 participants