Skip to content

V5 Missing hashType="noslash" #912

@thejohnhoffer

Description

@thejohnhoffer

The release of history@5 lost the ability to navigate a HashHistory without a slash in the hash (like #1/2/3 instead of #/1/2/3) due to a missing hashType option to createHashHistory.

After another user asked about the resulting loss of hashType in react-router-dom@6, one maintainer suggested we file in this repository. The solution developed in PR #911 would allow hashRoot="" to replicate the old behavior of hashType="noslash".

The ability to begin hashes with # instead of #/ is not only cosmetic. I am migrating an existing website from vanilla javascript to react, and backwards compatibility of existing URL hash values requires # instead of #/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions