Function ambient_api::prelude::ambient_element::use_interval_deps
source · pub fn use_interval_deps<D>(
hooks: &mut Hooks<'_>,
duration: Duration,
run_immediately: bool,
dependencies: D,
func: impl Send + Sync + FnMut(&D) + 'static
)
Expand description
Run cb
every duration
, passing in the current value of dependencies
.
This should be used when the callback depends on some value that can change over time.