FIxes for Suspense/Hydration
This commit is contained in:
parent
9c6aaed0a8
commit
df41e4dbc2
|
@ -94,6 +94,7 @@ where
|
|||
use leptos_dom::DynChild;
|
||||
|
||||
let cached_id = HydrationCtx::peak();
|
||||
let _space_for_inner = HydrationCtx::id();
|
||||
|
||||
DynChild::new(move || {
|
||||
if context.ready() {
|
||||
|
|
|
@ -110,9 +110,11 @@ where
|
|||
|
||||
let prev_child = RefCell::new(None);
|
||||
let cached_id = HydrationCtx::peak();
|
||||
let _space_for_inner = HydrationCtx::id();
|
||||
|
||||
DynChild::new(move || {
|
||||
if context.ready() {
|
||||
leptos_dom::warn!("<Transition/> ready and continuing from {}", cached_id);
|
||||
HydrationCtx::continue_from(cached_id);
|
||||
|
||||
let current_child = child(cx).into_view(cx);
|
||||
|
|
|
@ -29,7 +29,8 @@ impl HydrationCtx {
|
|||
unsafe { ID }
|
||||
}
|
||||
|
||||
pub(crate) fn id() -> usize {
|
||||
/// Increments the current hydration `id` and returns it
|
||||
pub fn id() -> usize {
|
||||
unsafe {
|
||||
let id = ID;
|
||||
|
||||
|
|
Loading…
Reference in New Issue