Dont use suspense in dog app, remove from use_future

This commit is contained in:
Jonathan Kelley committed 2023-07-14 17:17:08 -07:00
1 parent 4ab554dfe4
commit e751f63030
2 files changed
+2 -6

No files matched your search

+2 -2
View File
@@ -21,7 +21,7 @@ fn app_root(cx: Scope<'_>) -> Element {
.await .await
}); });
match breeds.suspend()? { match breeds.value()? {
Ok(breed_list) => cx.render(rsx! { Ok(breed_list) => cx.render(rsx! {
div { height: "500px", div { height: "500px",
h1 { "Select a dog breed!" } h1 { "Select a dog breed!" }
@@ -59,7 +59,7 @@ fn breed_pic(cx: Scope, breed: String) -> Element {
.await .await
}); });
match fut.suspend()? { match fut.value()? {
Ok(resp) => render! { Ok(resp) => render! {
div { div {
button { button {
-4
View File
@@ -167,10 +167,6 @@ impl<T> UseFuture<T> {
(Some(_), None) => UseFutureState::Pending, (Some(_), None) => UseFutureState::Pending,
} }
} }
pub fn suspend(&self) -> Option<&T> {
todo!()
}
} }
impl<'a, T> IntoFuture for &'a UseFuture<T> { impl<'a, T> IntoFuture for &'a UseFuture<T> {