From eeaf25d4968bf8bd9c0206675182c25881d1d9ec Mon Sep 17 00:00:00 2001 From: Luke <37006668+lukechu10@users.noreply.github.com> Date: Sun, 20 Oct 2024 21:45:06 +0100 Subject: [PATCH] Fix condition in `Suspense` is not reactive breaking hydration (#735) Fix condition is not reactive --- packages/sycamore-web/src/suspense.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sycamore-web/src/suspense.rs b/packages/sycamore-web/src/suspense.rs index 45a9d034..8faab670 100644 --- a/packages/sycamore-web/src/suspense.rs +++ b/packages/sycamore-web/src/suspense.rs @@ -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) } }