mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 12:43:08 +00:00
fix some lints in use on destroy
This commit is contained in:
parent
439bc4e9e6
commit
3dce650367
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ pub fn use_hook_with_cleanup<T: Clone + 'static>(
|
|||
hook: impl FnOnce() -> T,
|
||||
cleanup: impl FnOnce(T) + 'static,
|
||||
) -> T {
|
||||
let value = use_hook(|| hook());
|
||||
let value = use_hook(hook);
|
||||
let _value = value.clone();
|
||||
use_on_destroy(move || cleanup(_value));
|
||||
value
|
||||
|
|
Loading…
Reference in a new issue