Make cargo check --all --examples work!
This commit is contained in:
40 files changed
+295
-399
No files matched your search
@@ -41,8 +41,8 @@ fullstack = ["dioxus-fullstack"]
|
||||
|
||||
[dev-dependencies]
|
||||
axum = { version = "0.6.1", features = ["ws"] }
|
||||
dioxus = { path = "../dioxus" }
|
||||
dioxus-liveview = { workspace = true, features = ["axum"] }
|
||||
dioxus = { workspace = true }
|
||||
# dioxus-liveview = { workspace = true, features = ["axum"] }
|
||||
dioxus-ssr = { path = "../ssr" }
|
||||
criterion = { version = "0.5", features = ["async_tokio", "html_reports"] }
|
||||
|
||||
@@ -55,12 +55,12 @@ name = "incremental"
|
||||
required-features = ["ssr"]
|
||||
harness = false
|
||||
|
||||
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
|
||||
dioxus-desktop = { path = "../desktop" }
|
||||
# [target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
|
||||
# dioxus-desktop = { path = "../desktop" }
|
||||
|
||||
[target.'cfg(target_family = "wasm")'.dev-dependencies]
|
||||
console_error_panic_hook = "0.1.7"
|
||||
dioxus-router = { path = ".", features = ["web"] }
|
||||
dioxus-web = { workspace = true }
|
||||
# dioxus-web = { workspace = true }
|
||||
gloo = "0.8.0"
|
||||
wasm-bindgen-test = "0.3.33"
|
||||
@@ -44,7 +44,11 @@ async fn main() {
|
||||
|
||||
#[cfg(not(feature = "liveview"))]
|
||||
fn main() {
|
||||
launch(Route::Home {})
|
||||
launch(|| {
|
||||
rsx! {
|
||||
Router::<Route> {}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[component]
|
||||
@@ -66,8 +70,8 @@ fn Route1(user_id: usize, dynamic: usize, query: String, extra: String) -> Eleme
|
||||
}
|
||||
Link {
|
||||
to: Route::Route1 {
|
||||
user_id: *user_id,
|
||||
dynamic: *dynamic,
|
||||
user_id,
|
||||
dynamic,
|
||||
query: String::new(),
|
||||
extra: extra.clone() + ".",
|
||||
},
|
||||
@@ -87,7 +91,7 @@ fn Route1(user_id: usize, dynamic: usize, query: String, extra: String) -> Eleme
|
||||
fn Route2(user_id: usize) -> Element {
|
||||
rsx! {
|
||||
pre { "Route2{{\n\tuser_id:{user_id}\n}}" }
|
||||
{(0..*user_id).map(|i| rsx!{ p { "{i}" } })},
|
||||
{(0..user_id).map(|i| rsx!{ p { "{i}" } })},
|
||||
p { "Footer" }
|
||||
Link {
|
||||
to: Route::Route3 {
|
||||
@@ -100,8 +104,9 @@ fn Route2(user_id: usize) -> Element {
|
||||
|
||||
#[component]
|
||||
fn Route3(dynamic: String) -> Element {
|
||||
let mut current_route_str = use_signal(String::new);
|
||||
|
||||
let current_route = use_route()?;
|
||||
let current_route_str = use_signal(String::new);
|
||||
let parsed = Route::from_str(¤t_route_str.read());
|
||||
|
||||
let site_map = Route::SITE_MAP
|
||||
|
||||
Reference in new issue
Block a user