import * as React from 'react';
import * as _ from 'lodash';
export const useDeepCompareMemoize = (value, strinfigy) => {
    const ref = React.useRef();
    if (strinfigy
        ? JSON.stringify(value) !== JSON.stringify(ref.current)
        : !_.isEqual(value, ref.current)) {
        ref.current = value;
    }
    return ref.current;
};
//# sourceMappingURL=useDeepCompareMemoize.js.map