Function yew::functional::use_effect_with_deps[][src]

pub fn use_effect_with_deps<Callback, Destructor, Dependents>(
    callback: Callback,
    deps: Dependents
) where
    Callback: FnOnce(&Dependents) -> Destructor + 'static,
    Destructor: FnOnce() + 'static,
    Dependents: PartialEq + 'static, 
Expand description

This hook is similar to use_effect but it accepts dependencies.

Whenever the dependencies are changed, the effect callback is called again. To detect changes, dependencies must implement PartialEq. Note that the destructor also runs when dependencies change.