What is the correct way to set up these routes with a layout ?
Hi, I have a route called
vadashboard
and that route also has a _layout
hierarchy goes as:
Basically what i want is that before we apply the layout, we have a first stop in the /vadashboard
route is a dropdown where the user can select a client and once they select the client they get redirected.
Redirection is not an issue but every time the user clicks on the client, the route becomes /vadashboard/client/Kf3x0Vh3yEaqxg2DTLcaDUjpCH0oF0xH
, but what's rendered is still just the vadashboard.tsx
route4 Replies
conscious-sapphire•2mo ago
try this
conscious-sapphire•2mo ago
docs: https://tanstack.com/router/latest/docs/framework/react/routing/routing-concepts#layout-routes
Routing Concepts | TanStack Router React Docs
TanStack Router supports a number of powerful routing concepts that allow you to build complex and dynamic routing systems with ease. Each of these concepts is useful and powerful, and we'll dive into...
generous-apricotOP•2mo ago
I see, i didn't realize there was a
route.tsx
that worked as a layout ended up doing:
quite simpler and it works. Thanks a lot!conscious-sapphire•2mo ago
Nice. Glad to help!