Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ranile committed Nov 21, 2021
1 parent 3d510af commit 8b64369
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/yew-agent/src/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ where
let on_output = Rc::new(on_output);

let on_output_clone = on_output.clone();
let on_output_ref = use_ref(move || on_output_clone);
let on_output_ref = use_mut_ref(move || on_output_clone);

// Refresh the callback on every render.
{
let mut on_output_ref = on_output_ref.borrow_mut();
*on_output_ref = on_output;
}

let bridge = use_ref(move || {
let bridge = use_mut_ref(move || {
T::bridge(Callback::from(move |output| {
let on_output = on_output_ref.borrow().clone();
on_output(output);
Expand Down
2 changes: 1 addition & 1 deletion packages/yew/tests/use_reducer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn use_reducer_eq_works() {
content: HashSet::default(),
});

let render_count = use_ref(|| 0);
let render_count = use_mut_ref(|| 0);

let render_count = {
let mut render_count = render_count.borrow_mut();
Expand Down

0 comments on commit 8b64369

Please sign in to comment.