S
SolidJS•2mo ago
Aniket

Help to setup nested layout

Hey everyone 👋 I’m trying to figure out the best way to handle routing and nested layouts in SolidStart, similar to how it works in Next.js. In Next.js, I usually have a main layout file and then nested ones like (auth) and (main) — for example, (main) includes a common sidebar. But in SolidStart, I’m struggling with setting this up properly. I also noticed that if I add a <Nav /> in app.tsx, it shows up even on the 404 page, which I don’t want. What’s the best practice for handling nested layouts and layout isolation (like separate auth and main layouts) in SolidStart?
5 Replies
Madaxen86
Madaxen86•2mo ago
Check this guide
Carlin Fumaças
Carlin Fumaças•2mo ago
Is it possible to do nested layouts in standard SolidJS? and tagged template with html is a problem in these cases?
Madaxen86
Madaxen86•2mo ago
Well, without file routing, layouts are just wrapped components which you can pass children to. So no problem there.
Carlin Fumaças
Carlin Fumaças•2mo ago
thanks!

Did you find this page helpful?