fix router examples
This commit is contained in:
1 parent
5291b00798
commit
aa30079633
4 files changed
+4
-6
No files matched your search
@@ -5,7 +5,7 @@ use dioxus_router::prelude::*;
|
|||||||
fn main() {
|
fn main() {
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
|
|
||||||
LaunchBuilder::new(Route::Home {})
|
LaunchBuilder::new(|| rsx! {Router::<Route> {}})
|
||||||
.cfg(
|
.cfg(
|
||||||
Config::new().with_window(
|
Config::new().with_window(
|
||||||
WindowBuilder::new()
|
WindowBuilder::new()
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ use dioxus::prelude::*;
|
|||||||
use dioxus_router::prelude::*;
|
use dioxus_router::prelude::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
launch_desktop(Route::Home {});
|
launch_desktop(|| rsx! {Router::<Route> {}});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Routable, Clone, Debug, PartialEq)]
|
#[derive(Routable, Clone, Debug, PartialEq)]
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ fn main() {
|
|||||||
.with_module_level("dioxus", log::LevelFilter::Trace)
|
.with_module_level("dioxus", log::LevelFilter::Trace)
|
||||||
.init()
|
.init()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
launch_desktop(Route::Home {});
|
launch_desktop(|| rsx! {Router::<Route> {}});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Routable, Clone)]
|
#[derive(Routable, Clone)]
|
||||||
|
|||||||
@@ -54,7 +54,5 @@ fn Nav() -> Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
launch_desktop(Route::Blog {
|
launch_desktop(|| rsx! {Router::<Route> {}});
|
||||||
id: "hello".to_string(),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user