Navigating to an external route in beforeLoad
I currently have an app that verifies if a user is logged in or not. If not, we want to redirect them to our homepage. The problem is that our homepage does not use tanstack router so the navigate function gives us a type error. Normally in this situation, I would just use window.location to redirect the user but I also want to prevent the route component from loading.
Does the router have a way to redirect to routes “outside” of the routes it knows about?
2 Replies
ambitious-aqua•10mo ago
it's planned that you will be able to throw a redirect to an external site
quickest-silverOP•10mo ago
Thanks Manuel.