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
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.
@Madaxen86 you mean like this: https://stackblitz.com/edit/solidjs-templates-i3emwz?file=src%2FApp.tsx ? this does not render anything at
/app-1/itemsI was able to fix it by using a common layout: https://stackblitz.com/edit/solidjs-templates-mx7wqq?file=src%2FApp.tsx
Yeah, now all Route components are children of the Router component and every route has a component to render