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
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 navigationI see, thanks 👍