S
SolidJS3w ago
sh03

Difference between a nested route layout and just wrapping a route with a <Layout> component

Is there a practical difference between declaring a nested route layout like this: https://docs.solidjs.com/solid-start/building-your-application/routing#nested-layouts and just wrapping a route with a <Layout> component?
2 Replies
Brendonovich
Brendonovich3w ago
One difference is that the layout will only be mounted once with the nested route layout while you're navigating around underneath that layout. It'll unmount when you go to a route outside it. Wrapping each route with <Layout> will recreate the layout on each navigation
sh03
sh03OP3w ago
I see, thanks 👍
Want results from more Discord servers?
Add your server