UNPKG

ahooks

Version:
4 lines (3 loc) 199 B
export type ShouldUpdateFunc<T> = (prev: T | undefined, next: T) => boolean; declare function usePrevious<T>(state: T, shouldUpdate?: ShouldUpdateFunc<T>): T | undefined; export default usePrevious;