mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-02-25 11:57:12 +00:00
Merge pull request #1235 from Demonthos/fix-use-future-looping
Fix use_future always spawning a new task and never updating
This commit is contained in:
commit
b36a7a3993
1 changed files with 6 additions and 0 deletions
|
@ -52,8 +52,14 @@ where
|
||||||
val.set(Some(fut.await));
|
val.set(Some(fut.await));
|
||||||
task.take();
|
task.take();
|
||||||
})));
|
})));
|
||||||
|
|
||||||
|
// Mark that we don't need to regenerate
|
||||||
|
state.needs_regen.set(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update the current value
|
||||||
|
state.state.current_val = val.current_val.clone();
|
||||||
|
|
||||||
state
|
state
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue