wip: add use_callback hook

This commit is contained in:
Jonathan Kelley committed 2022-11-19 13:21:02 -08:00
1 parent 6c677e64da
commit 57c10174ec
4 files changed
+62 -6

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
use std::rc::Rc;
use dioxus::prelude::*;
fn main() {
dioxus_desktop::launch(app);
}
fn app(cx: Scope) -> Element {
let login = use_callback!(cx, || |evt| async {
//
});
cx.render(rsx! {
button {
onclick: login,
"Click me!"
}
})
}