Skip to content

[Bug]: HashRouter: browser's back button and navigate(-1) not work in some cases #9966

@reminjp

Description

@reminjp

What version of React Router are you using?

6.7.0

Steps to Reproduce

  1. Open https://codesandbox.io/s/react-router-6-7-0-hash-router-back-p0bztk
  2. Click the "Sub Page" link.
  3. Press the "Back" button.

Expected Behavior

Navigates to the root page.

Actual Behavior

Doesn't navigate.
It isn't reproduced when using [email protected].

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