wip: examples

This commit is contained in:
Jonathan Kelley committed 2021-09-21 12:11:04 -04:00
1 parent adf202eab9
commit f1cff845ce
10 files changed
+80 -26

No files matched your search

+2 -2
View File
@@ -25,8 +25,8 @@ static App: FC<()> = |cx| {
cx.render(rsx! {
div {
h1 {"{state}"}
CalculatorKey { name: "key-clear", onclick: move |_| state.get_mut().push_str("hello"), "{clear_text}" }
CalculatorKey { name: "key-sign", onclick: move |_| { state.get_mut().pop(); }, "±"}
CalculatorKey { name: "key-clear", onclick: move |_| state.modify().push_str("hello"), "{clear_text}" }
CalculatorKey { name: "key-sign", onclick: move |_| { state.modify().pop(); }, "±"}
}
})
};