Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flight] add support for Lazy components in Flight server #24068

Merged
merged 3 commits into from
Mar 10, 2022

Commits on Mar 9, 2022

  1. [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.
    gnoff committed Mar 9, 2022
    Configuration menu
    Copy the full SHA
    2e6cdb3 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2022

  1. Support Lazy elements

    React.Lazy can now return an element instead of a Component. This commit implements support for Lazy elements when server rendering.
    gnoff committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    6b9c8c6 View commit details
    Browse the repository at this point in the history
  2. 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.
    gnoff committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    a4329f4 View commit details
    Browse the repository at this point in the history