Problem with navigating to same route
After updating the
@tanstack/react-routerfrom version 1.120.13 to version 1.121.34 I have a problem when trying to navigate using to: '.' option in navigate from useNavigate (for Link component works the same). From what I've been able to determine, the router tries to redirect to basepath after calling navigate with to : '.'.
I found that this issue was related to that but it doesnt resolve my problem https://github.com/TanStack/router/pull/4472.
I prepare some demo to show the problem. To reproduce the issue go to Map and click on button open panel it than redirect you to the index route.
https://codesandbox.io/p/sandbox/tanstack-router-bug-example-j4qlpjGitHub
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.

5 Replies
genetic-orange•4mo ago
can you please create a github issue for this?
unwilling-turquoiseOP•4mo ago
Sure
genetic-orange•4mo ago
and if you want to contribute even further, a failing unit test as a PR would be perfect
unwilling-turquoiseOP•4mo ago
I create an issue describing the bug https://github.com/TanStack/router/issues/4526
GitHub
Regression: navigate({ to: "." }) redirects to base path after upda...
Which project does this relate to? Router Describe the bug After updating @tanstack/react-router from version 1.120.13 to 1.121.34, I encountered a regression when navigating with navigate({ to: &q...
genetic-orange•4mo ago
thanks!

