"use strict";

exports.__esModule = true;
exports["default"] = void 0;
var _react = require("react");
var _useMountedRef = _interopRequireDefault(require("../useMountedRef"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var _default = exports["default"] = function _default(cb, deps) {
  var mountedRef = (0, _useMountedRef["default"])();
  (0, _react.useEffect)(function () {
    if (!mountedRef.current) return;
    return cb();
  }, deps);
};