Fixes hydration errors for elements following a \<Suspense/\>

This commit is contained in:
Greg Johnston 2023-02-16 19:22:05 -05:00
parent 3e47a4b566
commit ed405c1f27
1 changed files with 2 additions and 2 deletions

View File

@ -87,6 +87,7 @@ where
} else {
// run the child; we'll probably throw this away, but it will register resource reads
let child = orig_child(cx).into_view(cx);
let after_original_child = HydrationCtx::id();
let initial = {
// no resources were read under this, so just return the child
@ -118,8 +119,7 @@ where
}
};
HydrationCtx::continue_from(current_id.clone());
HydrationCtx::continue_from(after_original_child);
initial
}
}