-
-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot update path params when navigating to '.'
#2415
Comments
@levrik not sure what your end goal is but you can achieve the same functionality if you just pass the path in useFixUrl and use that path in the to: "path" option. Am not sure why . is not able to pick up the current route. Code:
The "." being not able to pick up the current route is something we should definitely take a look at. |
@Lokendra-sinh Yeah. That would probably work but is also more prone to errors when being copied around for example. Also route components cannot be nested (using |
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
.Replacing
search
works without issues this way but not withparams
.Your Example Website or App
https://stackblitz.com/edit/github-aitiwm?file=src%2Fmain.tsx
Steps to Reproduce the Bug or Issue
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
Additional context
No response
The text was updated successfully, but these errors were encountered: