KEMBAR78
[Flight] Only use debug component info for parent stacks by eps1lon · Pull Request #34431 · facebook/react · GitHub
Skip to content

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Sep 9, 2025

Follow-up to #34229

We use Component debug info to fill in gaps between Fibers in the parent stack (for React DevTools, errorInfo.componentStack, hydration diffs, etc). It's unfortunate that this makes third-party Server Components disappear.

Before:
CleanShot 2025-09-09 at 17 17 54@2x
After:
CleanShot 2025-09-09 at 17 18 19@2x

@meta-cla meta-cla bot added the CLA Signed label Sep 9, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Sep 9, 2025
@react-sizebot
Copy link

react-sizebot commented Sep 9, 2025

Comparing: a9410fb...02bcec4

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.65 kB 530.65 kB = 93.49 kB 93.49 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 = 658.12 kB 658.12 kB = 115.77 kB 115.77 kB
facebook-www/ReactDOM-prod.classic.js = 682.25 kB 682.25 kB = 119.80 kB 119.80 kB
facebook-www/ReactDOM-prod.modern.js = 672.68 kB 672.68 kB = 118.11 kB 118.11 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 2,112.02 kB 2,105.20 kB = 303.44 kB 302.37 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 2,111.83 kB 2,105.01 kB = 303.42 kB 302.35 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 2,111.83 kB 2,105.01 kB = 303.42 kB 302.35 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 2,107.55 kB 2,100.73 kB = 302.44 kB 301.37 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 2,107.36 kB 2,100.54 kB = 302.42 kB 301.35 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 2,107.36 kB 2,100.54 kB = 302.42 kB 301.35 kB

Generated by 🚫 dangerJS against 02bcec4

@eps1lon eps1lon changed the title Expected behavior for component info in _debugInfo [Flight] Only use debug component info for parent stacks Sep 9, 2025
@eps1lon eps1lon force-pushed the sebbie/rsc-parent-stacks branch 3 times, most recently from dea84dc to 8cc64d4 Compare September 9, 2025 15:40
for (let i = 0; i < referencedDebugInfo.length; ++i) {
const debugInfoEntry = referencedDebugInfo[i];
if (debugInfoEntry.name != null) {
(debugInfoEntry: ReactComponentInfo);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Double checked that Flow starts erroring once we add another union member to ReactDebugInfoEntry with a name property. This type assertion ensures that future us needs to decide whether a new kind of ReactDebugInfoEntry with name should be transferred or not.

@eps1lon eps1lon force-pushed the sebbie/rsc-parent-stacks branch from 8cc64d4 to 02bcec4 Compare September 9, 2025 17:44
@eps1lon eps1lon merged commit eec50b1 into facebook:main Sep 9, 2025
241 checks passed
@eps1lon eps1lon deleted the sebbie/rsc-parent-stacks branch September 10, 2025 05:40
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.

3 participants