S
SolidJS15mo ago
Max

Nested Routes for index and route debugging

Is there any way to view the file based routes as they are generated or similar. I'm having difficulties with creating a shared layout at the index level. The closes I've gotten is by doing what's shown in https://discord.com/channels/722131463138705510/1057754962110730381/1057782711919579326. Struggling to see what's happening behind the scenes as it seems inconsistent between refresh, udpate.. etc. The expected outlet content seems to flash initially but then disappears.
3 Replies
Max
Max15mo ago
I can get it working very simply for other routes but not for / I think its likely not issue with routes. I'm passing the outlet as children to the layout component but I think it should be wrapped with something? pretty sure it has something to do with createBreakpoints used in the layout component. I'll look into that, but if anyone has had any similar complications with Outlet + Media queries etc.. or anything to look out for its appreciated!
Max
Max15mo ago
Made an example on https://codesandbox.io/s/musing-currying-ng4il5 . Hopefully it works but was a bit strange setting up the sandbox. Basically you can navigate home and about and it seems to work but when refreshing or going direct to url there children are not rendered
maxmezzomo
CodeSandbox
musing-currying-ng4il5 - CodeSandbox
musing-currying-ng4il5 by maxmezzomo using @solid-primitives/media, @solidjs/meta, @solidjs/router, solid-js, solid-start, solid-start-node, typescript, undici, vite
Max
Max15mo ago
From what I've been testing it might be outlet that I dont know if we can use that way? It it possible to in a way capture the content with Outlet and then pass that as children or props to another component