From 05956d035ef51e30c89600387d703cd9690a9633 Mon Sep 17 00:00:00 2001 From: JtotheThree Date: Sun, 21 Nov 2021 20:13:03 -0600 Subject: [PATCH] change use_ref to use_mut_ref --- yewdux-functional/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yewdux-functional/src/lib.rs b/yewdux-functional/src/lib.rs index 7176c8a..7cb90db 100644 --- a/yewdux-functional/src/lib.rs +++ b/yewdux-functional/src/lib.rs @@ -22,7 +22,7 @@ impl StoreRef { } pub fn on_output(mut self, on_output: impl Fn(T::Output) + 'static) -> Self { - self.output = Some(use_ref(move || { + self.output = Some(use_mut_ref(move || { Dispatch::bridge(Default::default(), on_output.into()) })); self @@ -64,7 +64,7 @@ pub fn use_store() -> StoreRef { let dispatch = { let state = state.clone(); // persist the Dispatch across renders - use_ref(move || { + use_mut_ref(move || { let on_state = Callback::from(move |new_state| { state.set(Some(new_state)); });