Function leptos::set_interval

source ·
pub fn set_interval(
    cb: impl Fn() + 'static,
    duration: Duration
) -> Result<IntervalHandle, JsValue>
👎Deprecated: use set_interval_with_handle() instead. In the future, set_interval() will no longer return a handle, for consistency with other timer helper functions.
Expand description

Repeatedly calls the given function, with a delay of the given duration between calls, returning a cancelable handle. See setInterval().