dillon1000/react
Commit
Browse files [Flight] Error if a legacy React Element is attempted to be rendered (#29043)
This errors on the client normally but in the case the `type` is a function - i.e. a Server Component - it wouldn't be transferred to error on the client so you end up with a worse error message. So this just implements the same check as ChildFiber.
Changed paths2 files
First-parent comparisonpackages/react-client/src/__tests__/ReactFlight-test.js ModifiedM packages/react-server/src/ReactFlightServer.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…