oCarrott
oCarrott
SSolidJS
Created by oCarrott on 12/11/2024 in #support
Multiple layouts using `Router`
Hi, I cant figure out how to do nested layouts like this
<SidebarProvider>
<SiderBar />
<Router>
<Router>
{routes.map((route) => (
<Route path={route.path} component={route.component} />
))}
</Router>
</Router>
<Router root={DashboardLayout}>
<Route path={routes[4].path} component={routes[4].component} />
</Router>
</SidebarProvider>
<SidebarProvider>
<SiderBar />
<Router>
<Router>
{routes.map((route) => (
<Route path={route.path} component={route.component} />
))}
</Router>
</Router>
<Router root={DashboardLayout}>
<Route path={routes[4].path} component={routes[4].component} />
</Router>
</SidebarProvider>
The issue with this setup is that I get an error from root={DashboardLayout} and I see the 404 page an the , probably because Router is used twice I don't know how to implement this without using Router twice, and how to prevent the error
6 replies
SSolidJS
Created by oCarrott on 4/8/2023 in #support
Uncaught TypeError: _tmpl$ is not a function
5 replies