Skip to content

[Bug]: When using unstable_useBlocker, the console logs "A router only supports one blocker at a time"  #10073

Closed
@Bestwebdesign

Description

@Bestwebdesign

What version of React Router are you using?

6.8.1

Steps to Reproduce

  1. Open https://stackblitz.com/edit/github-yrxhzt?file=package.json
    (basically it's the same example found here https://github.com/remix-run/react-router/tree/main/examples/navigation-blocking but using version 6.8.1)
  2. Open console
  3. Click on the link "Three (Form with blocker)"
  4. Enter some text in the input
  5. Click on another link like "Index", "One", "Two", ...
  6. Console will log "A router only supports one blocker at a time"

Expected Behavior

No warnings in the console.

Actual Behavior

Console logs a warning "A router only supports one blocker at a time".

Metadata

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