UNPKG

ahooks

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