UNPKG

199 BTypeScriptView Raw
1export type ShouldUpdateFunc<T> = (prev: T | undefined, next: T) => boolean;
2declare function usePrevious<T>(state: T, shouldUpdate?: ShouldUpdateFunc<T>): T | undefined;
3export default usePrevious;