Sfoglia il codice sorgente

update suspend in use_server_future

Evan Almloff 1 anno fa
parent
commit
716eb11426

+ 1 - 1
packages/fullstack/examples/static-hydrated/src/main.rs

@@ -36,7 +36,7 @@ async fn main() {
 }
 
 // Hydrate the page
-#[cfg(all(feature = "web", not(feature = "server")))]
+#[cfg(not(feature = "server"))]
 fn main() {
     dioxus_web::launch_with_props(
         dioxus_fullstack::router::RouteWithCfg::<Route>,

+ 1 - 1
packages/fullstack/src/hooks/server_future.rs

@@ -54,7 +54,7 @@ where
     // Suspend if the value isn't ready
     match resource.state().cloned() {
         UseResourceState::Pending => {
-            suspend();
+            suspend(resource.task());
             None
         }
         _ => Some(resource),