pub fn use_hook_with_cleanup<T>( hook: impl FnOnce() -> T, cleanup: impl FnOnce(T) + 'static, ) -> Twhere T: Clone + 'static,
Use a hook with a cleanup function