Skip to content
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

SSR: throw redirect in beforeLoader does nothing #966

Closed
universse opened this issue Jan 10, 2024 · 1 comment
Closed

SSR: throw redirect in beforeLoader does nothing #966

universse opened this issue Jan 10, 2024 · 1 comment

Comments

@universse
Copy link

universse commented Jan 10, 2024

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

  1. Add _auth.tsx with beforeLoader and _auth.profile.tsx.
  2. Click on Profile link, redirect is thrown and index route is loaded.
  3. Enter /profile route 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

@tannerlinsley
Copy link
Collaborator

We're tracking this internally with some key features around SSR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants