wip: more examples

This commit is contained in:
Jonathan Kelley committed 2021-07-08 10:17:51 -04:00
1 parent e4cdb645aa
commit 2547da36a0
9 files changed
+166 -55

No files matched your search

+2 -2
View File
@@ -16,7 +16,7 @@ fn main() {
}
static App: FC<()> = |cx| {
let (count, set_count) = use_state_classic(cx, || 0);
let mut count = use_state(cx, || 0);
cx.render(rsx! {
div {
@@ -24,7 +24,7 @@ static App: FC<()> = |cx| {
p { "Count is {count}" }
button {
"Click to increment"
onclick: move |_| set_count(count + 1)
onclick: move |_| count += 1
}
}
})