Bring back mroe hooks, remove old hooks, cleanup a number of examples

This commit is contained in:
Jonathan Kelley committed 2024-01-15 17:04:39 -08:00
1 parent b291a5c0b0
commit 74aa55f85f
33 files changed
+179 -643

No files matched your search

+3 -3
View File
@@ -22,7 +22,7 @@ fn app() -> Element {
dioxus_desktop::window().new_window(
VirtualDom::new_with_props(compose, tx.clone()),
Default::default(),
)
);
};
rsx! {
@@ -39,7 +39,7 @@ fn app() -> Element {
}
}
fn compose(receiver: UnboundedSender<String>) -> Element {
fn compose(tx: UnboundedSender<String>) -> Element {
let user_input = use_signal(String::new);
rsx! {
@@ -48,7 +48,7 @@ fn compose(receiver: UnboundedSender<String>) -> Element {
button {
onclick: move |_| {
cx.props.app_tx.send(user_input.get().clone());
tx.send(user_input.get().clone());
dioxus_desktop::window().close();
},
"Click to send"