KEMBAR78
[Fizz] Name content inside "Suspense fallback" by sebmarkbage · Pull Request #33723 · facebook/react · GitHub
Skip to content

Conversation

sebmarkbage
Copy link
Collaborator

@sebmarkbage sebmarkbage commented Jul 7, 2025

Content in Suspense fallbacks are really not considered part of the Suspense but since it does have some behavior it should be marked somehow separately from the Suspense content.

A follow up would be to do the same in Fiber.

@sebmarkbage sebmarkbage requested a review from gnoff July 7, 2025 17:03
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jul 7, 2025
@react-sizebot
Copy link

react-sizebot commented Jul 7, 2025

Comparing: 223f81d...c8da2e9

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 = 530.50 kB 530.50 kB = 93.66 kB 93.66 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 = 655.04 kB 655.04 kB = 115.35 kB 115.35 kB
facebook-www/ReactDOM-prod.classic.js = 675.12 kB 675.12 kB = 118.77 kB 118.77 kB
facebook-www/ReactDOM-prod.modern.js = 665.54 kB 665.54 kB = 117.13 kB 117.13 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.development.js +0.40% 194.65 kB 195.43 kB +0.34% 34.47 kB 34.59 kB
oss-stable/react-server/cjs/react-server.development.js +0.40% 194.65 kB 195.43 kB +0.34% 34.47 kB 34.59 kB
oss-experimental/react-server/cjs/react-server.production.js +0.38% 152.47 kB 153.05 kB +0.35% 26.48 kB 26.57 kB
oss-experimental/react-server/cjs/react-server.development.js +0.36% 214.20 kB 214.98 kB +0.32% 37.17 kB 37.29 kB
oss-experimental/react-markup/cjs/react-markup.production.js +0.25% 250.11 kB 250.73 kB +0.18% 45.95 kB 46.04 kB
facebook-www/ReactDOMServer-prod.modern.js +0.25% 251.25 kB 251.87 kB +0.20% 45.00 kB 45.09 kB
facebook-www/ReactDOMServer-prod.classic.js +0.24% 253.61 kB 254.23 kB +0.20% 45.34 kB 45.43 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.production.js +0.24% 232.54 kB 233.11 kB +0.19% 42.18 kB 42.26 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.production.js +0.24% 232.57 kB 233.13 kB +0.19% 42.20 kB 42.28 kB
facebook-www/ReactDOMServerStreaming-prod.modern.js +0.24% 260.33 kB 260.94 kB +0.19% 47.66 kB 47.75 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.production.js +0.24% 237.16 kB 237.72 kB +0.19% 43.99 kB 44.08 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.production.js +0.24% 237.18 kB 237.74 kB +0.19% 44.02 kB 44.10 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.production.js +0.24% 262.53 kB 263.15 kB +0.20% 46.65 kB 46.74 kB
oss-stable-semver/react-dom/cjs/react-dom-server.bun.production.js +0.24% 239.38 kB 239.94 kB +0.21% 43.71 kB 43.80 kB
oss-stable/react-dom/cjs/react-dom-server.bun.production.js +0.24% 239.46 kB 240.02 kB +0.20% 43.74 kB 43.83 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.production.js +0.23% 268.07 kB 268.69 kB +0.20% 48.80 kB 48.89 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.production.js +0.23% 273.82 kB 274.44 kB +0.18% 49.13 kB 49.22 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.production.js +0.22% 255.53 kB 256.10 kB +0.20% 46.28 kB 46.37 kB
oss-stable/react-dom/cjs/react-dom-server.browser.production.js +0.22% 255.61 kB 256.17 kB +0.20% 46.31 kB 46.40 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.production.js +0.22% 260.85 kB 261.41 kB +0.18% 48.33 kB 48.41 kB
oss-stable/react-dom/cjs/react-dom-server.edge.production.js +0.22% 260.92 kB 261.48 kB +0.18% 48.35 kB 48.44 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.production.js +0.22% 261.09 kB 261.65 kB +0.18% 46.78 kB 46.87 kB
oss-stable/react-dom/cjs/react-dom-server.node.production.js +0.22% 261.16 kB 261.73 kB +0.18% 46.81 kB 46.89 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.production.js +0.21% 292.03 kB 292.65 kB +0.16% 51.15 kB 51.23 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.production.js +0.21% 298.37 kB 298.99 kB +0.16% 53.52 kB 53.60 kB
oss-experimental/react-dom/cjs/react-dom-server.node.production.js +0.20% 306.25 kB 306.87 kB +0.16% 53.38 kB 53.46 kB
oss-stable-semver/react-server/cjs/react-server.production.js = 135.95 kB 135.61 kB +0.28% 23.85 kB 23.92 kB
oss-stable/react-server/cjs/react-server.production.js = 135.95 kB 135.61 kB +0.28% 23.85 kB 23.92 kB

Generated by 🚫 dangerJS against c8da2e9

}
return createComponentStackFromType(
componentStack.parent,
'Suspense Fallback',
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we can't get the actual type from props because it could be a lazy node?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The issue is that the real type is modeled as a symbol. However, we don't have a symbol for the fallback case. So I just gave it a string name since in practice we format them the same as built-ins.

@sebmarkbage sebmarkbage force-pushed the suspensefallbackstack branch from 6e1caf1 to c8da2e9 Compare July 7, 2025 17:38
@sebmarkbage sebmarkbage merged commit c932e45 into facebook:main Jul 7, 2025
241 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 7, 2025
Content in Suspense fallbacks are really not considered part of the
Suspense but since it does have some behavior it should be marked
somehow separately from the Suspense content.

A follow up would be to do the same in Fiber.

DiffTrain build for [c932e45](c932e45)
sebmarkbage added a commit that referenced this pull request Jul 8, 2025
github-actions bot pushed a commit that referenced this pull request Jul 8, 2025
github-actions bot pushed a commit that referenced this pull request Jul 8, 2025
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