Skip to content

Conversation

@sebmarkbage
Copy link
Collaborator

We've long had the CPU suspense feature behind a flag under the terrible API unstable_expectedLoadTime={arbitraryNumber}. We've known for a long time we want it to just be defer={true} (or just <Suspense defer> in the short hand syntax). So this adds the new name and warns for the old name.

For only the new name, I also implemented SSR semantics in Fizz. It has two effects here.

  1. It renders the fallback before the content (similar to prerender) allowing siblings to complete quicker.
  2. It always outlines the result. When streaming this should really happen naturally but if you defer a prerendered content it also implies that it's expensive and should be outlined. It gives you a opt-in to outlining similar to suspensey images and css but let you control it manually.

@sebmarkbage sebmarkbage requested review from acdlite and gnoff October 31, 2025 04:04
@meta-cla meta-cla bot added the CLA Signed label Oct 31, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Oct 31, 2025
This is similar to what we do with prerenders.
@react-sizebot
Copy link

Comparing: 6fb7754...0871e9a

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.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 605.41 kB 605.41 kB = 107.22 kB 107.21 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 664.38 kB 664.42 kB = 117.09 kB 117.10 kB
facebook-www/ReactDOM-prod.classic.js = 688.25 kB 688.29 kB = 121.13 kB 121.14 kB
facebook-www/ReactDOM-prod.modern.js = 678.67 kB 678.72 kB +0.01% 119.49 kB 119.50 kB
oss-stable-semver/react-server/cjs/react-server.production.js +2.20% 142.39 kB 145.52 kB +1.71% 25.03 kB 25.46 kB
oss-stable/react-server/cjs/react-server.production.js +2.20% 142.39 kB 145.52 kB +1.71% 25.03 kB 25.46 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-server/cjs/react-server.production.js +2.20% 142.39 kB 145.52 kB +1.71% 25.03 kB 25.46 kB
oss-stable/react-server/cjs/react-server.production.js +2.20% 142.39 kB 145.52 kB +1.71% 25.03 kB 25.46 kB
oss-experimental/react-server/cjs/react-server.production.js +0.48% 154.49 kB 155.24 kB +0.35% 26.79 kB 26.88 kB
oss-experimental/react-server/cjs/react-server.development.js +0.34% 216.41 kB 217.14 kB +0.31% 37.46 kB 37.58 kB
oss-experimental/react-markup/cjs/react-markup.production.js +0.28% 252.23 kB 252.93 kB +0.24% 46.29 kB 46.40 kB
facebook-www/ReactDOMServerStreaming-prod.modern.js +0.26% 266.33 kB 267.01 kB +0.20% 48.57 kB 48.67 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.production.js +0.24% 294.53 kB 295.24 kB +0.23% 51.55 kB 51.67 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.production.js +0.24% 295.45 kB 296.17 kB +0.21% 51.37 kB 51.48 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.production.js +0.24% 264.86 kB 265.50 kB +0.24% 47.00 kB 47.11 kB
facebook-www/ReactDOMServer-prod.modern.js +0.24% 256.60 kB 257.21 kB +0.19% 45.83 kB 45.92 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.production.js +0.24% 300.87 kB 301.58 kB +0.22% 53.92 kB 54.04 kB
facebook-www/ReactDOMServer-prod.classic.js +0.24% 258.94 kB 259.55 kB +0.18% 46.17 kB 46.25 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.production.js +0.24% 270.40 kB 271.04 kB +0.19% 49.13 kB 49.22 kB
oss-experimental/react-dom/cjs/react-dom-server.node.production.js +0.23% 308.71 kB 309.43 kB +0.22% 53.76 kB 53.88 kB

Generated by 🚫 dangerJS against 0871e9a

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.

2 participants