Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions yewdux-functional/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl<T: Store> StoreRef<T> {
}

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
Expand Down Expand Up @@ -64,7 +64,7 @@ pub fn use_store<T: Store>() -> StoreRef<T> {
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));
});
Expand Down