update router book

This commit is contained in:
Adrian Wannenmacher committed 2022-12-16 10:41:44 +01:00
1 parent 1890ebc4f7
commit a947ce2215
23 files changed
+212 -212

No files matched your search

+5 -5
View File
@@ -37,14 +37,14 @@ You can override it by setting the `failure_named_navigation` value of the
# extern crate dioxus_router;
# use dioxus_router::prelude::*;
fn NamedNavigationFallback(cx: Scope) -> Element {
cx.render(rsx! {
render! {
h1 { "Named navigation failure!" }
})
}
}
fn App(cx: Scope) -> Element {
use_router(
&cx,
cx,
&|| RouterConfiguration {
failure_named_navigation: comp(NamedNavigationFallback),
..Default::default()
@@ -52,9 +52,9 @@ fn App(cx: Scope) -> Element {
&|| Segment::empty()
);
cx.render(rsx! {
render! {
Outlet { }
})
}
}
```