Skip to content

Bug: fabric completeRoot called for suspended comp. w/ same tree output #35263

@hannojg

Description

@hannojg

React version: 19.3 (latest main)

Steps To Reproduce

  1. Checkout the test case in this PR: fabric: reproduction completeRoot called for suspended component update #35262

Link to code example: #35262

The current behavior

I noticed that when we suspend a component in fabric react and in that component a state update occurs, that we still will call completeRoot.

This has performance implications, as completeRoot will call into c++ and invoke ShadowTree::commit.

I think that when a suspended component has a state update and we still show the very same fallback component, then there should be no completeRoot call, as technically, nothing has changed about the UI output.

I believe that this is a bug with in react-reconciler / react fabric

The expected behavior

We shouldn't call completeRoot if there is no change in the rendering tree output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions