dioxus
dioxus copied to clipboard
Nested Routes do not work [#432]
(fixes DioxusLabs/dioxus#432)
This makes nested routes work by checking routes one level (closest shared parent Route or Router) at a time and in relevance (naive) order. So for example:
- /blog/1 <--- level: 0, check order: 2
- /blog/ <--- level: 0, check order: 3
|- /laraira <--- level: 1, check order: 1
|- /:id <--- level: 1, check order: 2
- /blog/10 <--- level: 0, check order: 1
- / <--- level: 0, check order: 4
On each level there can be a single match at a time, so the first one to be found will be used and we no longer check the rest, and if the one found has nested routes, they will be checked when rendered only against same level siblings, and so on.
There's a few issues mentioned in comments I'd like to iterate with you guys, so please leave some comments :)