update suspend in use_server_future
This commit is contained in:
1 parent
c9603ea984
commit
716eb11426
2 files changed
+2
-2
No files matched your search
@@ -36,7 +36,7 @@ async fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hydrate the page
|
// Hydrate the page
|
||||||
#[cfg(all(feature = "web", not(feature = "server")))]
|
#[cfg(not(feature = "server"))]
|
||||||
fn main() {
|
fn main() {
|
||||||
dioxus_web::launch_with_props(
|
dioxus_web::launch_with_props(
|
||||||
dioxus_fullstack::router::RouteWithCfg::<Route>,
|
dioxus_fullstack::router::RouteWithCfg::<Route>,
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ where
|
|||||||
// Suspend if the value isn't ready
|
// Suspend if the value isn't ready
|
||||||
match resource.state().cloned() {
|
match resource.state().cloned() {
|
||||||
UseResourceState::Pending => {
|
UseResourceState::Pending => {
|
||||||
suspend();
|
suspend(resource.task());
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
_ => Some(resource),
|
_ => Some(resource),
|
||||||
|
|||||||
Reference in new issue
Block a user