UNPKG

@appello/common

Version:

Common package with many useful features for web and mobile development

4 lines (3 loc) 228 B
import { Unidentifiable } from '../../types'; export type ShouldUpdateFunc<T> = (prev: Unidentifiable<T>, next: T) => boolean; export declare function usePrevious<T>(state: T, shouldUpdate?: ShouldUpdateFunc<T>): T | undefined;