awesome: arbitrary expressions excepted without braces

This commit is contained in:
Jonathan Kelley committed 2021-12-30 03:14:47 -05:00
1 parent 14961023f9
commit 4c85bcfdc8
40 files changed
+825 -767

No files matched your search

+4 -6
View File
@@ -26,20 +26,18 @@ fn app(cx: Scope) -> Element {
rsx!(cx, div {
h1 {"count is {count}"}
button {
button { onclick: move |_| task.stop(),
"Stop counting"
onclick: move |_| task.stop()
}
button {
button { onclick: move |_| task.resume(),
"Start counting"
onclick: move |_| task.resume()
}
button {
"Switch counting direcion"
onclick: move |_| {
*direction.modify() *= -1;
task.restart();
}
},
"Switch counting direcion"
}
})
}