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

+5 -9
View File
@@ -5,8 +5,8 @@ fn main() {
}
fn app() -> Element {
let future = use_future(|_| async move {
let eval = eval(
let future = use_future(|| async move {
let mut eval = eval(
r#"
dioxus.send("Hi from JS!");
let msg = await dioxus.recv();
@@ -22,12 +22,8 @@ fn app() -> Element {
res
});
match future.value() {
Some(v) => rsx!(
p { "{v}" }
),
_ => rsx!(
p { "hello" }
),
match future.value().read().as_ref() {
Some(v) => rsx!( p { "{v}" } ),
_ => rsx!( p { "waiting.." } ),
}
}