Closed osmano807 closed 3 weeks ago
Oh interesting, I hadn't noticed that this is now backwards: putting the param in the child gives it to both of them.
#[component]
pub fn App() -> impl IntoView {
provide_meta_context();
view! {
<Router>
<Routes fallback=|| ()>
<ParentRoute path=path!("/test") view=TestParent>
<Route path=path!(":test_id") view=TestChild/>
</ParentRoute>
</Routes>
</Router>
}
}
TestParent Params: ParamsMap([("test_id", "foo")])
TestChild Params: ParamsMap([("test_id", "foo")])
Will fix. Honestly though maybe just providing all the matched params to routes at every level makes the most sense. This has been raised a couple times and is reasonable enough.
Describe the bug Path params are passed to the
ParentRoute
but not the the nestedRoute
. In 0.6 I use this nested routes to implement sidebar/drawers.Leptos Dependencies Actually running 4bc999e
To Reproduce
Expected behavior Should get the
:test_id
param in both theParentRoute
and childRoute
, instead I get: