Add back ondestroy hook

This commit is contained in:
Jonathan Kelley committed 2024-01-15 14:27:20 -08:00
1 parent 6134a2ce24
commit bb6aa9e792
8 files changed
+121 -146

No files matched your search

+2 -5
View File
@@ -8,10 +8,7 @@ fn main() {
fn app() -> Element {
let toggled = use_signal(|| false);
use_global_shortcut("ctrl+s", {
to_owned![toggled];
move || toggled.modify(|t| !*t)
});
use_global_shortcut("ctrl+s", move || toggled.toggle());
rsx!("toggle: {toggled.get()}")
rsx!("toggle: {toggled}")
}