having separate layout

Hello guys, I’m new to solid-start I have this inside my routes (app)/login/index.jsx I’m trying to have a layout to it different from the app.jsx How do I do this please ??
12 Replies
peerreynders
peerreynders6mo ago
Does this thread help?
Damonstrr
DamonstrrOP6mo ago
Hi I just checked your response, thanks for that. But in my project how do I set layout for (auth) if I do (auth).jsx inside routes and i visit /login i do not see the login code
No description
Damonstrr
DamonstrrOP6mo ago
Oh I think I have solved it I had to pass the props props.children
peerreynders
peerreynders6mo ago
(auth).jsx (the layout) needs to be a sibling to (auth) not under it.
Damonstrr
DamonstrrOP6mo ago
Oh yeah that works routes (auth).jsx (auth) login/index.jsx And inside the (auth).jsx pass the props.children
peerreynders
peerreynders6mo ago
It mirrors the component structure of nested routes where you can specify the layout on the wrapping Route component.
Damonstrr
DamonstrrOP6mo ago
Cheers mate
Damonstrr
DamonstrrOP6mo ago
No description
peerreynders
peerreynders6mo ago
pass the props.children
Yup Layouts Also only modules with a export default are considered route components. So you are actually free to co-locate related modules if they only have named exports.
Damonstrr
DamonstrrOP6mo ago
Alright, Cheers Not sure why most times when I make changes I see hydration mismatch. Unable to find DOm nodes for hydration key. But if I delete node modules and reinstall the error is gone
peerreynders
peerreynders6mo ago
GitHub
[Bug?]:Error: Hydration Mismatch. Unable to find DOM nodes for hydr...
Duplicates I have searched the existing issues Latest version I have tested the latest version Current behavior 😯 Whenever i create a route with folders like routes/admin/dash.tsx this error happen...
Damonstrr
DamonstrrOP6mo ago
Thanks once again
Want results from more Discord servers?
Add your server