router
router copied to clipboard
SSR: throw redirect in beforeLoader does nothing
Describe the bug
Throw redirect in beforeLoader does not work for SSR example.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-u6w1y3?file=src%2Froutes%2F_auth.profile.tsx,src%2Froutes%2F_auth.tsx
Steps to Reproduce the Bug or Issue
- Add _auth.tsx with
beforeLoaderand _auth.profile.tsx. - Click on Profile link, redirect is thrown and index route is loaded.
- Enter
/profileroute via address bar. User is not redirected to '/' route.
- Need to open StackBlitz browser URL in a new tab since the URL in iframe does not get updated.
Expected behavior
User is redirected to '/' route.
Screenshots or Videos
No response
Platform
NA
Additional context
No response