Skip to main content

watch

Function watch 

pub fn watch<W, T>(
    deps: impl Fn() -> W + 'static,
    callback: impl Fn(&W, Option<&W>, Option<T>) -> T + Clone + 'static,
    immediate: bool,
) -> impl Fn() + Clone
where W: Clone + 'static, T: 'static,
👎Deprecated:

This function is being removed to conform to Rust idioms. Please use Effect::watch() instead.

Expand description

Creates an Effect, equivalent to Effect::watch.