fix: hydration IDs for elements following <Suspense/> (closes #527) (#531)

This commit is contained in:
Greg Johnston
2023-02-16 21:12:52 -05:00
committed by GitHub
parent 0071a48b8a
commit 76a74ecde2

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
}
}