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

+2 -2
View File
@@ -48,7 +48,7 @@ fn app() -> Element {
/// Suspense is achieved my moving the future into only the component that
/// actually renders the data.
fn Doggo() -> Element {
let fut = use_future(|_| async move {
let fut = use_future(|| async move {
#[derive(serde::Deserialize)]
struct DogApi {
message: String,
@@ -61,7 +61,7 @@ fn Doggo() -> Element {
.await
});
match fut.value() {
match fut.value().read().as_ref() {
Some(Ok(resp)) => rsx! {
button {
onclick: move |_| fut.restart(),