Skip to content

Commit

Permalink
Fix hydration mismatch when using render_to_string_await_suspense (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechu10 authored Oct 20, 2024
1 parent 4a91338 commit 614b49c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/sycamore-web/src/suspense.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ pub fn Suspense(props: SuspenseProps) -> View {
let end = view! { NoHydrate { suspense-end(data-key=key.to_string()) } };

if mode == SsrMode::Blocking {
view! { (start) (marker) (end) }
view! {
NoSsr {}
(start)
(marker)
(end)
}
} else if mode == SsrMode::Streaming {
view! {
NoSsr {}
Expand Down

0 comments on commit 614b49c

Please sign in to comment.