dillon1000/react
Commit
Browse files [Flight] add support for Lazy components in Flight server (#24068)
* [Flight] add support for Lazy components in Flight server Lazy components suspend until resolved just like in Fizz. Add tests to confirm Lazy works with Shared Components and Client Component references. * Support Lazy elements React.Lazy can now return an element instead of a Component. This commit implements support for Lazy elements when server rendering. * add lazy initialization to resolveModelToJson adding lazying initialization toResolveModelToJson means we use attemptResolveElement's full logic on whatever the resolved type ends up being. This better aligns handling of misued Lazy types like a lazy element being used as a Component or a lazy Component being used as an element.
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…