how to automatically redirect a user to a subpage?
I have a route named schedule, and I want that by default it would move the user to schedule/tires, the index schedule page has a nav with 2 links to schedule/tires and schedule/orders, and an outlet.
1 Reply
ratty-blush•2y ago
You can use <Navigate />, that's the way React Router does it as well.
You may also need a layout for these nav links.
https://tanstack.com/router/latest/docs/framework/react/guide/navigation
Navigation | TanStack Router Docs
Everything is Relative
Believe it or not, every navigation within an app is relative, even if you aren't using explicit relative path syntax (../../somewhere). Any time a link is clicked or an imperative navigation call is made, you will always have an origin path and a destination path which means you are navigating from one route to another ...