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

[Fabric] Fix reparenting bug in legacy Suspense mount #21995

Merged
merged 3 commits into from
Jul 30, 2021

Commits on Jul 30, 2021

  1. Add reparenting invariant to React Noop

    Fabric does not allow nodes to be reparented, so I added the equivalent
    invariant to React Noop's so we can catch regressions.
    
    This causes some tests to fail, which I'll fix in the next step.
    acdlite committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    f87c6e1 View commit details
    Browse the repository at this point in the history
  2. Fix: Use getOffscreenContainerProps

    The type of these props is different per renderer. An oversight
    from facebook#21960. Unfortunately wasn't caught by Flow because fiber props
    are `any`-typed.
    acdlite committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    10829e9 View commit details
    Browse the repository at this point in the history
  3. [Fabric] Fix reparenting in legacy Suspense mount

    Fixes a weird case during legacy Suspense mount where the offscreen host
    container of a tree that suspends during initial mount is recreated
    instead of cloned, since there's no current fiber to clone from.
    
    Fabric considers this a reparent even though the parent from the first
    pass never committed.
    
    Instead we can override the props from the first pass before the
    container completes. It's a bit of a hack, but no more so than the rest
    of the legacy root Suspense implementation — the hacks are designed
    to make it usable by non-strict mode-compliant trees.
    acdlite committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    005a43a View commit details
    Browse the repository at this point in the history