Solidstart routing group

/(auth)
├── /login
│ └── index.tsx
└── /register
└── index.tsx
/(auth)
├── /login
│ └── index.tsx
└── /register
└── index.tsx
I have two routes, login and register, and I want to share a common navbar across these routes. In Next.js, I would typically use the layout system to achieve this. Is there a similar way to implement a shared layout in SolidStart, where the navbar is defined in one place and applied to both routes?
No description
6 Replies
Brendonovich
Brendonovich4mo ago
Put your layout in (auth).tx as a sibling to the (auth) folder
No description
Md Shehab
Md ShehabOP4mo ago
and now i can catch the login and register route from (auth).tsx ??
Brendonovich
Brendonovich4mo ago
Yeah those two routes will be available as props.children in the layout like Next's app router
Md Shehab
Md ShehabOP4mo ago
sorry brother it is just not working in my case
No description
Brendonovich
Brendonovich4mo ago
hmm try restarting the dev server? the login and register routes work without the layout being there yeah?
Md Shehab
Md ShehabOP4mo ago
yes after restarting the server it is working as like next.js. actullay i am very noob in solid.js but i really love how it approach :solid: thank you for your help
Want results from more Discord servers?
Add your server