Skip to content

Commit

Permalink
use use_ref instead of use_memo_base
Browse files Browse the repository at this point in the history
  • Loading branch information
ranile committed Aug 3, 2024
1 parent aaa4f98 commit a3f3bb5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/yew/src/suspense/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ where
let output = use_state(|| None);
// We only commit a result if it comes from the latest spawned future. Otherwise, this
// might trigger pointless updates or even override newer state.
let latest_id = use_memo_base(|()| (Cell::new(0u32), ()), ());

let latest_id = use_ref(|| Cell::new(0u32));
let suspension = {
let output = output.clone();

Expand Down

0 comments on commit a3f3bb5

Please sign in to comment.