Skip to content

Cannot update path params when navigating to '.' #2415

@levrik

Description

@levrik

Which project does this relate to?

Router

Describe the bug

I wrote a hook which should replace the slug in the URL if it doesn't match reality anymore.
For example /projects/here-is-the-name-123 -> /projects/new-name-123.

navigate({ to: '.', params: { slug: 'new-name' }, replace: true });

Replacing search works without issues this way but not with params.

Your Example Website or App

https://stackblitz.com/edit/github-aitiwm?file=src%2Fmain.tsx

Steps to Reproduce the Bug or Issue

  1. Click on "Project 123" or "Document 123" link
  2. See old slug from path params rendered
  3. It should replace after 1 second but it does not

You can try replacing the to: '.' by a real route and see how it works but this then does not work for 2 different routes anymore.

Expected behavior

Path params to get replaced when navigating to '.'.

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Edge
  • Version: 129

Additional context

No response

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