/** * Access the previous value of a state or prop after a render. * * @param value - The value to track. * @param defaultValue - Optional default value to return on the very first render before a previous value exists. * @returns The previous value. * * @example * ```tsx * const [count, setCount] = useState(0); * const prevCount = usePrevious(count); * return
Now: {count}, Before: {prevCount}
; * ``` */ export declare function usePrevious(value: T): T | undefined; export declare function usePrevious(value: T, defaultValue: T): T;