|
@@ -191,6 +191,13 @@ impl SsrRendererPool {
|
|
// poll the future, which may call server_context()
|
|
// poll the future, which may call server_context()
|
|
with_server_context(server_context.clone(), || virtual_dom.rebuild_in_place());
|
|
with_server_context(server_context.clone(), || virtual_dom.rebuild_in_place());
|
|
|
|
|
|
|
|
+ // If streaming is disabled, wait for the virtual dom to finish all suspense work
|
|
|
|
+ // before rendering anything
|
|
|
|
+ if streaming_mode == StreamingMode::Disabled {
|
|
|
|
+ ProvideServerContext::new(virtual_dom.wait_for_suspense(), server_context.clone())
|
|
|
|
+ .await
|
|
|
|
+ }
|
|
|
|
+
|
|
let mut pre_body = String::new();
|
|
let mut pre_body = String::new();
|
|
|
|
|
|
if let Err(err) = wrapper.render_head(&mut pre_body, &virtual_dom) {
|
|
if let Err(err) = wrapper.render_head(&mut pre_body, &virtual_dom) {
|
|
@@ -218,13 +225,6 @@ impl SsrRendererPool {
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
- // If streaming is disabled, wait for the virtual dom to finish all suspense work
|
|
|
|
- // before rendering anything
|
|
|
|
- if streaming_mode == StreamingMode::Disabled {
|
|
|
|
- ProvideServerContext::new(virtual_dom.wait_for_suspense(), server_context.clone())
|
|
|
|
- .await
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// Render the initial frame with loading placeholders
|
|
// Render the initial frame with loading placeholders
|
|
let mut initial_frame = renderer.render(&virtual_dom);
|
|
let mut initial_frame = renderer.render(&virtual_dom);
|
|
|
|
|