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

[Partial Hydration] Don't invoke listeners on parent of dehydrated event target #16591

Merged
merged 8 commits into from
Sep 5, 2019

Commits on Sep 4, 2019

  1. Configuration menu
    Copy the full SHA
    1a62e56 View commit details
    Browse the repository at this point in the history
  2. Move Suspense boundary check to getClosestInstanceFromNode

    Now getClosestInstanceFromNode can return either a host component,
    host text component or suspense component when the suspense
    component is dehydrated.
    
    We then use that to ignore events on a suspense component.
    sebmarkbage committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    1f77c91 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2019

  1. Attach the HostRoot fiber to the DOM container

    This lets us detect if an event happens on this root's subtree before it
    has rendered something.
    sebmarkbage committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    5a28397 View commit details
    Browse the repository at this point in the history
  2. Add todo

    The approach of checking isFiberMounted answers if we might be in an
    in-progress hydration but it doesn't answer which root or boundary
    might be in-progress so we don't know what to wait for.
    
    This needs some refactoring.
    sebmarkbage committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    14db1d7 View commit details
    Browse the repository at this point in the history
  3. Refactor isFiberMountedImpl to getNearestMountedFiber

    We'll need the nearest boundary for event replaying so this prepares for
    that.
    
    This surfaced an issue that we attach Hydrating tag on the root but normally
    this (and Placement) is attached on the child. This surfaced an issue
    that this can lead to both Placement and Hydrating effects which is not
    supported so we need to ensure that we only ever use one or the other.
    sebmarkbage committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    fbaca52 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    38737b5 View commit details
    Browse the repository at this point in the history
  5. Cache tags

    sebmarkbage committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    be7e4f9 View commit details
    Browse the repository at this point in the history
  6. Check the ContainerInstanceKey before the InstanceKey

    The container is inside the instance, so we must find it before the
    instance, since otherwise we'll miss it.
    sebmarkbage committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    1616fe3 View commit details
    Browse the repository at this point in the history