Skip to content

Bug: React 19.2 flushSync flickers briefly #35151

@Eliav2

Description

@Eliav2

We’re seeing a production-only flicker regression for flushSync calls in React 19.2 that does not occur in React 19.1.

Demo Links

What Happens

The component relies on flushSync inside useResizeObserver:
https://github.com/Eliav2/react-responsive-overflow-list/blob/main/src/hooks/useResizeObserver.ts

On resize, we intentionally trigger synchronous layout updates using flushSync to prevent any intermediate visual state from appearing.

Behavior Difference

React 19.1:
flushSync blocks and applies the update immediately — the intermediate state never appears.

React 19.2:
React momentarily exposes the intermediate layout state even inside a flushSync block in production builds, resulting in a very short but noticeable flicker.

Additional Notes

  • Flicker only appears in production builds of React 19.2.
  • Both 19.1 and 19.2 do not flicker in local development mode.
  • No code changes between demos—only the React version changed.

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