feat: add update functionality to useref

This commit is contained in:
Jonathan Kelley committed 2021-10-04 10:22:20 -04:00
1 parent 5502429626
commit a2b0c50a34
16 files changed
+77 -47

No files matched your search

+2 -2
View File
@@ -3,7 +3,7 @@ This example is a simple iOS-style calculator. This particular example can run a
This calculator version uses React-style state management. All state is held as individual use_states.
*/
use dioxus::events::on::*;
use dioxus::events::*;
use dioxus::prelude::*;
fn main() {
@@ -56,7 +56,7 @@ const APP: FC<()> = |cx, _| {
}
};
let keydownhandler = move |evt: KeyboardEvent| match evt.key_code() {
let keydownhandler = move |evt: KeyboardEvent| match evt.key_code {
KeyCode::Add => operator.set(Some("+")),
KeyCode::Subtract => operator.set(Some("-")),
KeyCode::Divide => operator.set(Some("/")),