T
TanStack6mo ago
deep-jade

Nested Layouts

If I wanted a nested layout could I create another __root.tsx file within a directory. I’m coming from Next so a bit confused how layouts work. In Next layout is a reserved filename.
4 Replies
like-gold
like-gold6mo ago
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...
deep-jade
deep-jadeOP6mo ago
Ok so if i use the outlet componeent within a layout all children of that route will have that layout? So there's no reserved word for layout routes?
multiple-amethyst
multiple-amethyst6mo ago
https://tanstack.com/router/latest/docs/framework/react/routing/routing-concepts#pathless-layout-routes no reserved word but theres also pathless routes if you do not want the layout to be in the URL
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...
fascinating-indigo
fascinating-indigo6mo ago
if you are using file based routing in a folder if you create a route.tsx it is basically same thing as a layout.tsx in next and the folder name also appears in the URL

Did you find this page helpful?