fix the fullstack platform with the new launch API

This commit is contained in:
Evan Almloff committed 2024-01-18 10:19:39 -06:00
1 parent cb5a43c120
commit a323962a22
7 files changed
+281 -255

No files matched your search

+2 -2
View File
@@ -170,7 +170,7 @@ impl IncrementalRenderer {
pub async fn render<R: WrapBody + Send + Sync>(
&mut self,
route: String,
virtual_dom: VirtualDom,
virtual_dom_factory: impl FnOnce() -> VirtualDom,
output: &mut (impl AsyncWrite + Unpin + std::marker::Send),
rebuild_with: impl FnOnce(&mut VirtualDom) -> Pin<Box<dyn Future<Output = ()> + '_>>,
renderer: &R,
@@ -181,7 +181,7 @@ impl IncrementalRenderer {
} else {
// if not, create it
let freshness = self
.render_and_cache(route, virtual_dom, output, rebuild_with, renderer)
.render_and_cache(route, virtual_dom_factory(), output, rebuild_with, renderer)
.await?;
tracing::trace!("cache miss");
Ok(freshness)