fix: exampels

This commit is contained in:
Jonathan Kelley committed 2022-01-25 21:41:40 -05:00
1 parent 5c4bd0881b
commit a8952a9ee8
14 files changed
+400 -285

No files matched your search

+3 -3
View File
@@ -5,13 +5,13 @@ fn main() {
}
fn app(cx: Scope) -> Element {
let disabled = use_state(&cx, || false);
let (disabled, set_disabled) = use_state(&cx, || false);
cx.render(rsx! {
div {
button {
onclick: move |_| disabled.set(!disabled.get()),
"click to " [if **disabled {"enable"} else {"disable"} ] " the lower button"
onclick: move |_| set_disabled(!disabled),
"click to " [if *disabled {"enable"} else {"disable"} ] " the lower button"
}
button {