use_interval
Reactive counter increases on every interval.
Demo
Usage
use leptos::*;
use leptos_use::{use_interval, UseIntervalReturn};
#[component]
fn Demo() -> impl IntoView {
let UseIntervalReturn {
counter,
reset,
is_active,
pause,
resume
} = use_interval( 200 );
view! { }
}
Server-Side Rendering
On the server this function will simply be ignored.
Feature
This function is only available if the crate feature
use_interval
is enabled