Make cargo check --all --examples work!
This commit is contained in:
40 files changed
+295
-399
No files matched your search
@@ -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}" }
|
||||
}
|
||||
Reference in new issue
Block a user