diff --git a/src/core/maybe_rw_signal.rs b/src/core/maybe_rw_signal.rs index 867b21e..cc7cbd0 100644 --- a/src/core/maybe_rw_signal.rs +++ b/src/core/maybe_rw_signal.rs @@ -93,7 +93,7 @@ impl MaybeRwSignal { Self::DynamicRead(s) => { let (r, w) = signal(s.get_untracked()); - create_effect(move |_| { + Effect::new(move |_| { w.update(move |w| { *w = s.get(); }); diff --git a/src/on_click_outside.rs b/src/on_click_outside.rs index 7ac68c0..d3868c9 100644 --- a/src/on_click_outside.rs +++ b/src/on_click_outside.rs @@ -1,7 +1,6 @@ use crate::core::{ElementMaybeSignal, ElementsMaybeSignal}; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::diagnostics::SpecialNonReactiveZone; cfg_if! { if #[cfg(not(feature = "ssr"))] { use leptos::prelude::*; @@ -115,6 +114,7 @@ where #[cfg(not(feature = "ssr"))] { + use leptos::prelude::diagnostics::SpecialNonReactiveZone; let OnClickOutsideOptions { ignore, capture, diff --git a/src/use_drop_zone.rs b/src/use_drop_zone.rs index caaa35a..6756866 100644 --- a/src/use_drop_zone.rs +++ b/src/use_drop_zone.rs @@ -1,7 +1,6 @@ use crate::core::ElementMaybeSignal; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::diagnostics::SpecialNonReactiveZone; use leptos::prelude::wrappers::read::Signal; use leptos::prelude::*; use std::fmt::{Debug, Formatter}; @@ -78,6 +77,7 @@ where #[cfg(not(feature = "ssr"))] { + use leptos::prelude::diagnostics::SpecialNonReactiveZone; let UseDropZoneOptions { on_drop, on_enter, diff --git a/src/use_media_query.rs b/src/use_media_query.rs index 7700248..f3ad681 100644 --- a/src/use_media_query.rs +++ b/src/use_media_query.rs @@ -91,7 +91,7 @@ pub fn use_media_query(query: impl Into>) -> Signal { listener.replace(Rc::new(move |_| update()) as Rc); } - create_effect(move |_| update()); + Effect::new(move |_| update()); on_cleanup(cleanup); }} diff --git a/src/use_supported.rs b/src/use_supported.rs index 1ffa7b8..b121e49 100644 --- a/src/use_supported.rs +++ b/src/use_supported.rs @@ -1,4 +1,3 @@ -use leptos::prelude::wrappers::read::Signal; use leptos::prelude::*; /// SSR compatibe `is_supported`