useNavgate ignore basepath
I updated from 1.17.4 to 1.19.1 and found this behavior)
Steps to Reproduce:
1. Go to about page
2. Click to button
https://stackblitz.com/edit/tanstack-router-g6pvet?file=src%2Fmain.tsx
19 Replies
deep-jade•2y ago
did this work in 1.17.4?
extended-salmonOP•2y ago
@Manuel Schiller yes
deep-jade•2y ago
can you find out which version introduced this issue?
by trying out a few versions
extended-salmonOP•2y ago
Yes, I'll take a look now
deep-jade•2y ago
1.18.4 had lots of changes, so maybe this introduced the regression.
extended-salmonOP•2y ago
yes, 1.18.4 changed the behavior
deep-jade•2y ago
@Tanner Linsley I guess this was not intended ?
deep-jade•2y ago
your reproducer had an error, I fixed this but the original issue still persists
https://stackblitz.com/edit/tanstack-router-nwpm5t?file=src%2Froutes%2Fabout.tsx
Manuel Schiller
StackBlitz
Router Quickstart File Based Example (forked) - StackBlitz
Run official live example code for Router Quickstart File Based, created by Tanstack on StackBlitz
deep-jade•2y ago
the basepath works if you explicitly set the
to:
deep-jade•2y ago
Manuel Schiller
StackBlitz
Router Quickstart File Based Example (forked) - StackBlitz
Run official live example code for Router Quickstart File Based, created by Tanstack on StackBlitz
extended-salmonOP•2y ago
Oh, I didn't even think about it, it's a good workaround, thanks)
deep-jade•2y ago
can you please create a github issue with all the information so this does not get lost?
ideally, the
to does not have to be setdeep-jade•2y ago
it's probably this here:
https://github.com/TanStack/router/commit/3b559fc931823540ff7b55d16a5e48f78879f6ae#diff-2ac234f610fa0e0c2146252c10a5266af9c5b6d0b63659a0fa4c9f2c4472596aR861-R867
GitHub
fix: ssr improvements (#1248) · TanStack/router@3b559fc
* fix: ssr improvements
* fix: remove log
* fix: remove log
* fix: remove comments
* docs: root abstraction
* fix: remove commented code
* fix: remove old TLoaderData fix attempt
...
extended-salmonOP•2y ago
I'll do it today)
extended-salmonOP•2y ago
GitHub
useNavgate ignore basepath after 1.18.4 · Issue #1273 · TanStack/ro...
Describe the bug I updated from 1.17.4 to 1.19.1 and found this behavior) after navigate without from options router delete basepath from url. Your Example Website or App https://stackblitz.com/edi...
extended-salmonOP•2y ago
Hi, I found a solution, maybe it will work)
https://github.com/TanStack/router/pull/1275
deep-jade•2y ago
@Tanner Linsley can you please review this PR? since you changed the behavior here, you might know whether maybe there is more to be done than that
FYI: you need to run
pnpm prettier:write to auto fix the formattingextended-salmonOP•2y ago
I saw it, thanks, I'm already launching it)
robust-apricot•2y ago
Looks like it should fix it
Go for it.