TanStackT
TanStack2y ago
4 replies
nursing-lime

List-Detail Layout with Path Params

I am struggling a bit with this conceptually. I think once I see the pattern, its going to help me out a lot. I am trying to make this a list detail view using a sub_layout (_layout). So the root layout is just an outlet that I can feed other page layouts into. Anyway, I want a sidebar nav that lists the pokemons and then the details page renders in the main element adjacent to the sidebar. How do I structure this accordingly?

https://stackblitz.com/edit/tanstack-router-dyxcm6?file=src%2Froutes%2F__root.tsx
StackBlitzJeff Kinley
Run official live example code for Router Basic File Based, created by Tanstack on StackBlitz
Router Basic File Based Example (forked) - StackBlitz
Was this page helpful?