Fix router examples

This commit is contained in:
Jonathan Kelley committed 2024-01-17 18:41:31 -08:00
1 parent 5291b00798
commit 1df329bda4
6 files changed
+35 -15

No files matched your search

+12 -2
View File
@@ -54,7 +54,17 @@ fn Nav() -> Element {
}
fn main() {
launch_desktop(Route::Blog {
id: "hello".to_string(),
launch_desktop(|| {
let cfg = || {
RouterConfig::default().initial_route(Route::Blog {
id: "hello".to_string(),
})
};
rsx! {
Router::<Route> {
config: cfg
}
}
});
}