import { useRef, useEffect } from 'react';

var useUpdateEffect = function useUpdateEffect(callback) {
  var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  var isInitialMount = useRef(true);
  useEffect(function () {
    if (isInitialMount.current) {
      isInitialMount.current = false;
      return;
    }
    callback();
  }, dependencies);
};

export { useUpdateEffect as default };
//# sourceMappingURL=useUpdateEffect.js.map
