Make cargo check --all --examples work!

This commit is contained in:
Jonathan Kelley committed 2024-01-19 14:19:49 -08:00
1 parent 08475af221
commit 83bce6ce97
40 files changed
+295 -399

No files matched your search

+7 -11
View File
@@ -4,22 +4,18 @@ use dioxus::prelude::*;
use dioxus_signals::Signal;
fn main() {
dioxus_desktop::launch(app);
// dioxus_desktop::launch(app);
}
// Because signal is never read in this component, this component will not rerun when the signal changes
fn app() -> Element {
// Because signal is never read in this component, this component will not rerun when the signal changes
use_context_provider(|| Signal::new(0));
rsx! {
Child {}
}
rsx! { Child {} }
}
// This component does read from the signal, so when the signal changes it will rerun
#[component]
fn Child() -> Element {
let signal: Signal<i32> = *use_context(cx).unwrap();
// This component does read from the signal, so when the signal changes it will rerun
rsx! {
"{signal}"
}
let signal: Signal<i32> = use_context();
rsx! { "{signal}" }
}