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] Support Keyed Server Components #28123

Merged
merged 7 commits into from
Feb 5, 2024

Commits on Jan 26, 2024

  1. Add flag

    sebmarkbage committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    59d5100 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2024

  1. Configuration menu
    Copy the full SHA
    46991aa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f90382 View commit details
    Browse the repository at this point in the history
  3. Pass keyPath and implicitSlot as two new contextual values

    This keeps track of the keys from parent Server Components that are
    inherited down.
    sebmarkbage committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    b729be0 View commit details
    Browse the repository at this point in the history
  4. Pass the keyPath context when rendering a Server Component

    This is then prepended to the key of the terminal client element.
    sebmarkbage committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    8e025ec View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c49a32f View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2024

  1. Don't dedupe Elements if they're in a non-default Context

    If an element gets wrapped in a different server component then that has
    a different keyPath context and the element might end up with a different
    key.
    
    So we don't use the deduping mechanism if we're already inside a
    Server Component parent with a key or otherwise. Only the simple case
    gets deduped.
    
    The props of a client element are still deduped though if they're the
    same instance.
    sebmarkbage committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    893316d View commit details
    Browse the repository at this point in the history