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

Don't modify keyPath until right before recursive renderNode call #27366

Merged
merged 1 commit into from
Sep 13, 2023

Commits on Sep 13, 2023

  1. Don't modify keyPath until right before recursive renderNode call

    Currently, if a component suspends, the keyPath has already been modified to
    include the identity of the component itself; the path is set before the
    component body is called (akin to the begin phase in Fiber). An accidental
    consequence is that when the promise resolves and component is retried, the
    identity gets appended to the keyPath again, leading to a duplicate node in
    the path.
    
    To address this, we should only modify contexts after any code that may suspend.
    For maximum safety, this should occur as late as possible: right before the
    recursive renderNode call, before the children are rendered.
    acdlite committed Sep 13, 2023
    Configuration menu
    Copy the full SHA
    e03c96d View commit details
    Browse the repository at this point in the history