Skip to content

[Bug]: useResolvedPath breaking. #11052

@chinfeng

Description

@chinfeng

What version of React Router are you using?

6.20

Steps to Reproduce

Because of useResolvedPath is broken, now I am unable to deal with navigate inside the wildcard '/path/to/*' route ...

eg:

// route path is "/base/*"
const to = useResolvedPath('path/to');
const handle = () => navigate(to);
<Link to="path/to">path/to</Link>

Expected Behavior

It will always navigate to /base/path/to before useResolvedPath is broken.

Actual Behavior

It will navigate /base/path/to/path/to/path/to/... depends on my current path both navigate and <Link>.

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