UNPKG

rooks

Version:

Collection of awesome react hooks

11 lines (10 loc) 402 B
/** * usePreviousDifferent hook for React * It returns the past value which was different from the current one. * * @param currentValue The value whose previously different value is to be tracked * @returns The previous value * @see https://rooks.vercel.app/docs/hooks/usePreviousDifferent */ declare function usePreviousDifferent<T>(currentValue: T): T | null; export { usePreviousDifferent };