feat: add update functionality to useref
This commit is contained in:
1 parent
5502429626
commit
a2b0c50a34
16 files changed
+77
-47
No files matched your search
@@ -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("/")),
|
||||
|
||||
Reference in new issue
Block a user