TanStackT
TanStackโ€ข17mo agoโ€ข
36 replies
radical-lime

Breaking parent layout inheritance

Hi everyone,

I'm using file-based routing and have the following structure:

/_root.tsx                  // Uses HomeLayout component
/$lang/apps/index.tsx       // Uses AppsList component, inherits HomeLayout from _root
/$lang/workspaces/index.tsx // Uses WorkspaceList component, inherits HomeLayout from _root


I want to create a new route
/$lang/apps/$category/pages.tsx

This needs a new layout, not inherit the HomeLayout. I tried adding /$lang/apps/$category/_index_.tsx (also _route_.tsx with <MainLayout> component (with outlet of course) but no luck. what am I missing? ๐Ÿ™‚
Every sub-page of $category should be using the MainLayout
Was this page helpful?