Encoded URL params cause redirect loop on page refresh
Is this suppose to happen?
When using encoded parameters in routes, client-side navigation works fine, but hard refresh/page reload causes
Reproduction steps:
1. Use
2. In
3. Uncomment
4. Navigate to a post with spaces in title
5.
Client navigation works - URL shows encoded params, console shows decoded
6.
Hard refresh the page → infinite redirect loop
Expected: Page should load normally on refresh, just like client navigation
Actual:
Anyone else seeing this? Is there a workaround for encoded params during SSR?
Created an issue of GitHub
https://github.com/TanStack/router/issues/4514
When using encoded parameters in routes, client-side navigation works fine, but hard refresh/page reload causes
ERR_TOO_MANY_REDIRECTS.Reproduction steps:
1. Use
start-basic https://github.com/tanstack/router/tree/main/examples/react/start-basic example app2. In
post.tsx, change params for postId from post.id to post.title3. Uncomment
fetchPost({ data: postId }) and return {} so you do not get post not found error.4. Navigate to a post with spaces in title
5.
6.
Expected: Page should load normally on refresh, just like client navigation
Actual:
ERR_TOO_MANY_REDIRECTS errorAnyone else seeing this? Is there a workaround for encoded params during SSR?
Created an issue of GitHub
https://github.com/TanStack/router/issues/4514