Skip to content

Bug: non-Hook startTransition waits for stale work to finish #25814

Open
@gaearon

Description

@gaearon

Not sure if this is a bug, but it breaks my expectations.

Here's the same example with useTransition and startTransition.

Repro steps:

  1. Click "Posts"
  2. Immediately click "Contact"

With useTransition, the state change is instant because rendering slow Posts component is abandoned.

With startTransition, the state change is slow because it waits for the Posts component to finish rendering anyway.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions