import { useState } from 'react';
export function usePrevious(value, defaultValue) {
    const [current, setCurrent] = useState(value);
    const [previous, setPrevious] = useState(defaultValue);
    if (value !== current) {
        setPrevious(current);
        setCurrent(value);
    }
    return previous;
}
//# sourceMappingURL=hooks.js.map