Dont use suspense in dog app, remove from use_future
This commit is contained in:
2 files changed
+2
-6
No files matched your search
+2
-2
@@ -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 {
|
||||||
|
|||||||
@@ -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> {
|
||||||
|
|||||||
Reference in new issue
Block a user