S
SolidJS3mo ago
Stefan

Issue with nested routes

When navigating to /app-1/items in the following example the Items component is rendered correctly: https://stackblitz.com/edit/solidjs-templates-huocfk?file=src%2FApp.tsx When clicking on Settings in the menu, the Settings component is not rendered. It is rendered when reloading the page though. It seems the nested Router is not notified about the location change. Any ideas how such a nested router/routes structure can be achieved?
4 Replies
Madaxen86
Madaxen863mo ago
I think that’s because you render the Routes of App1 as the component of an App‘s route, but it should be that route’s children.
Stefan
StefanOP3mo ago
@Madaxen86 you mean like this: https://stackblitz.com/edit/solidjs-templates-i3emwz?file=src%2FApp.tsx ? this does not render anything at /app-1/items
Stefan
StefanOP3mo ago
Madaxen86
Madaxen863mo ago
Yeah, now all Route components are children of the Router component and every route has a component to render
Want results from more Discord servers?
Add your server