pub fn use_interval_fn<CbFn, N>( callback: CbFn, interval: N, ) -> Pausable<impl Fn() + Clone, impl Fn() + Clone>where CbFn: Fn() + Clone + 'static, N: Into<MaybeSignal<u64>>,
Wrapper for set_interval with controls.
set_interval
Link to Demo
let Pausable { pause, resume, is_active } = use_interval_fn( || { // do something }, 1000, );
On the server this function will simply be ignored.