import { useMemo, useRef } from 'react';
export const useCustomCompareMemo = (factory, deps, comparator) => {
    const dependencies = useRef();
    if (dependencies.current === undefined || !comparator(dependencies.current, deps)) {
        dependencies.current = deps;
    }
    return useMemo(factory, dependencies.current);
};
