Function leptos_use::use_interval

source ·
pub fn use_interval<N>(
    interval: N
) -> UseIntervalReturn<impl Fn() + Clone, impl Fn() + Clone, impl Fn() + Clone>
where N: Into<MaybeSignal<u64>>,
Expand description

Reactive counter increases on every interval.

§Demo

Link to Demo

§Usage

let UseIntervalReturn {
    counter,
    reset,
    is_active,
    pause,
    resume
}  = use_interval( 200 );

§Server-Side Rendering

On the server this function will simply be ignored.