TanStackT
TanStack2y ago
6 replies
wet-aqua

Nested Folder Index Routes

I am new to the TanStack Router. I can't figure out how nested folder index routes work. I want an Outlet for a route, with an index route. My route structure looks like this:

- routes
__root.tsx
index.tsx
- contributions
index.tsx
stats.tsx
projects.tsx

contributions/index.tsx includes an Outlet. I want stats.tsx to be the index route for contributions.

See: https://codesandbox.io/p/devbox/white-rgb-c78vtp?file=%2Fsrc%2Froutes%2Fposts%2Findex.tsx%3A8%2C1
Was this page helpful?