Skip to content

[Bug]: When using unstable_useBlocker with initial value true, Works on the second transition.Β #10144

Closed
@g4yamanaka

Description

What version of React Router are you using?

6.8.2

Steps to Reproduce

  1. Open https://stackblitz.com/edit/vitejs-vite-lja2ey?file=src/App.tsx
  2. Click "1" link.
  3. Click "home" link.
  4. Click "home" once more.

Expected Behavior

Confirm does pop up when first click.
The "2" link, which is set to true in the middle instead of the default, works as expected.

Actual Behavior

Confirm does pop up when second click.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions