pateketrueke / yrv

Your routing vibes! (for Svelte)
https://svelte.dev/repl/0f07c6134b16432591a9a3a0095a80de
161 stars 9 forks source link

Problem when use nested router with route path `/` #55

Closed gaconkzk closed 2 years ago

gaconkzk commented 3 years ago

Seem we can't use nested route with default '/' path, do we have any plan or work around for this case?

Example: main router

<Router>
  <Route path="/" component="{Home}" />
  <Route path="/login" exact component="{Login}" />
</Router>

Then in Home component we also have a router

<Router>
  <Route exact component="{Dashboard}" />
  <Route path="/:id" exact component="{DetailItem}" />
</Router>

I tried many combination, including add/remove exact prop, but seem the router render is not working as I want, when use exact in path "/", the child router not rendering at all. When clear exact, the /login will also render the Home component.

For now, I have to use /main or /home for the Home component instead of / that I actually need :(

pateketrueke commented 3 years ago

So much thanks for your input, I'll need some time to investigate this, probably it align with other issues we have.

pateketrueke commented 2 years ago

This seems to be fixed on v0.0.57 💣