Skip to content

Commit

Permalink
Fix condition in Suspense is not reactive breaking hydration (#735)
Browse files Browse the repository at this point in the history
Fix condition is not reactive
  • Loading branch information
lukechu10 authored Oct 20, 2024
1 parent 4573c19 commit eeaf25d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sycamore-web/src/suspense.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ pub fn Suspense(props: SuspenseProps) -> View {

view! {
NoSsr {
Show(when=move || !IS_HYDRATING.get() && is_loading.get()) {
Show(when=move || is_loading.get() && !IS_HYDRATING.get()) {
(fallback())
}
}
Show(when=move || !IS_HYDRATING.get() && !is_loading.get()) {
Show(when=move || !is_loading.get() && !IS_HYDRATING.get()) {
(view)
}
}
Expand Down

0 comments on commit eeaf25d

Please sign in to comment.