SolidJSS
SolidJSโ€ข3mo agoโ€ข
5 replies
maxwell8888

File based routing - pass props from nested layout to children

I have an app where the outer/wrapper/layout component has state stored as signals, and then the different routes have children which also use this state so the signals are passed down via props. This worked fine as an SPA but I am migrating to SolidStart so that I can make use of SSG and SSR and as far as I can tell it is not possible to pass props down to child components when using file-based-routing "nested layouts", i.e. with props.children. I've not used nextjs or anything similar, so is my first time using a metaframework with file based routing and I'm not sure if this the normal/typical behaviour for nested layouts and how this is worked around.
Build your SolidStart app with file-based routing. Create pages, nested layouts, and dynamic routes with simple file structure.
Was this page helpful?