UNPKG

312 BTypeScriptView Raw
1import type { DependencyList } from 'react';
2type Effect<T extends DependencyList> = (changes?: number[], previousDeps?: T, currentDeps?: T) => void | (() => void);
3declare const useTrackedEffect: <T extends DependencyList>(effect: Effect<T>, deps?: [...T] | undefined) => void;
4export default useTrackedEffect;