'use strict';

var React = require('react');

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

module.exports = useUpdateEffect;
//# sourceMappingURL=useUpdateEffect.js.map
