'use strict';

var React = require('react');

function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
    const ref = React.useRef({
        value: value,
        previous: value
    }); // We compare values before making an update to ensure that
    // a change has been made. This ensures the previous value is
    // persisted correctly between renders.
    return React.useMemo(()=>{
        if (ref.current.value !== value) {
            ref.current.previous = ref.current.value;
            ref.current.value = value;
        }
        return ref.current.previous;
    }, [
        value
    ]);
}

exports.usePrevious = $010c2913dbd2fe3d$export$5cae361ad82dce8b;
//# sourceMappingURL=index.js.map
