Function consecuit::hooks::use_effect_relaxed [−][src]
pub fn use_effect_relaxed<Args, OnDrop, Eff>(
cc: HookBuilder,
(func, args): (Eff, Args)
) -> impl HookReturn<()> where
OnDrop: FnOnce() + 'static,
Args: PartialEq + Clone + 'static,
Eff: FnOnce(Args) -> OnDrop,
Expand description
Like use_effect, but takes a closure instead of a function.
This mean you don’t have to pass every dependency through args
.
For React devs, this is equivalent to react-hooks/exhaustive-deps
not being enforced.