dioxus_lib::prelude

Function use_hook_with_cleanup

source
pub fn use_hook_with_cleanup<T>(
    hook: impl FnOnce() -> T,
    cleanup: impl FnOnce(T) + 'static,
) -> T
where T: Clone + 'static,
Expand description

Use a hook with a cleanup function