Layouts in file-based routing: can they be nested inside folders?
Hi! I have a question about TanStack Router and file-based routing.
If I use file-based routing, do layouts always have to live at the root of the /routes folder?
For example, in Next.js, you can organize files like this:
Currently, I'm trying to do the same thing on Tanstack Start like this:
In this structure, each folder can have its own layout.tsx scoped to its pages.
Is a similar structure possible with TanStack Router, or do layouts need to be declared only at the top level?
Thanks a lot!
If I use file-based routing, do layouts always have to live at the root of the /routes folder?
For example, in Next.js, you can organize files like this:
Currently, I'm trying to do the same thing on Tanstack Start like this:
In this structure, each folder can have its own layout.tsx scoped to its pages.
Is a similar structure possible with TanStack Router, or do layouts need to be declared only at the top level?
Thanks a lot!