dillon1000/react

Commit

Get Server Component Function Location for Parent Stacks using Child's Owner Stack (#33629)

This is using the same trick as #30798 but for runtime code too. It's
essential zero cost.

This lets us include a source location for parent stacks of Server
Components when it has an owned child's location. Either from JSX or
I/O.

Ironically, a Component that throws an error will likely itself not get
the stack because it won't have any JSX rendered yet.
Browse files
Changed paths8 files
First-parent comparison
M packages/react-client/src/ReactFlightClient.js ModifiedM packages/react-client/src/__tests__/ReactFlight-test.js ModifiedM packages/react-devtools-shared/src/backend/fiber/renderer.js ModifiedM packages/react-reconciler/src/ReactFiberComponentStack.js ModifiedM packages/react-server/src/ReactFizzComponentStack.js ModifiedM packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js ModifiedM packages/shared/ReactComponentStackFrame.js ModifiedM packages/shared/ReactTypes.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…