Skip to content

Delay setting useTransition isPending to true until JND #18595

Closed
@subhero24

Description

@subhero24

Do you want to request a feature or report a bug?
Maybe a feature?

When using Suspense and useTransition, the isPending of useTransition is immediately set to true.
I want to show a spinner when a transition is still pending, but showing it immediately results in a flashing spinner when the underlying promise resolves very fast. This is not a nice experience.

Is there a useTransition suspense option to delay the isPending indicator? I want to prevent the spinner from showing if the transition completes in for example 100ms.

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