- useChange(effect, deps?, stopWatchByDefault?): {
beginWatch: (() => void);
resetWatcher: (() => void);
stopWatch: (() => void);
} Parameters
- effect: EffectCallback
Optional
deps: DependencyList = []Optional
stopWatchByDefault: boolean = false
Returns {
beginWatch: (() => void);
resetWatcher: (() => void);
stopWatch: (() => void);
}
- An object containing utility functions for managing the watcher.
beginWatch: (() => void)
resetWatcher: (() => void)
stopWatch: (() => void)
Hook for managing the execution of an effect based on changes in dependencies.