We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8bbb5f9 + 05956d0 commit e3c5272Copy full SHA for e3c5272
yewdux-functional/src/lib.rs
@@ -22,7 +22,7 @@ impl<T: Store> StoreRef<T> {
22
}
23
24
pub fn on_output(mut self, on_output: impl Fn(T::Output) + 'static) -> Self {
25
- self.output = Some(use_ref(move || {
+ self.output = Some(use_mut_ref(move || {
26
Dispatch::bridge(Default::default(), on_output.into())
27
}));
28
self
@@ -64,7 +64,7 @@ pub fn use_store<T: Store>() -> StoreRef<T> {
64
let dispatch = {
65
let state = state.clone();
66
// persist the Dispatch across renders
67
- use_ref(move || {
+ use_mut_ref(move || {
68
let on_state = Callback::from(move |new_state| {
69
state.set(Some(new_state));
70
});
0 commit comments