mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
Fix hydration of <Routes/>
This commit is contained in:
parent
ae82395100
commit
66ac7d2a9d
1 changed files with 3 additions and 4 deletions
|
@ -30,6 +30,7 @@ pub fn Routes(
|
|||
});
|
||||
|
||||
let mut branches = Vec::new();
|
||||
let id_before = HydrationCtx::peek();
|
||||
let frag = children(cx);
|
||||
let children = frag
|
||||
.as_children()
|
||||
|
@ -198,10 +199,8 @@ pub fn Routes(
|
|||
})
|
||||
});
|
||||
|
||||
Fragment::new_with_id(
|
||||
frag.id().clone(),
|
||||
vec![(move || root.get()).into_view(cx)]
|
||||
)
|
||||
HydrationCtx::continue_from(id_before);
|
||||
(move || root.get()).into_view(cx)
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
|
Loading…
Reference in a new issue