"use strict";

exports.__esModule = true;
exports.useStableCallback = void 0;
var _react = require("react");
var useStableCallback = fn => {
  var fnRef = (0, _react.useRef)(fn);
  (0, _react.useEffect)(() => {
    fnRef.current = fn;
  });
  return (0, _react.useCallback)(function () {
    return fnRef.current(...arguments);
  }, []);
};
exports.useStableCallback = useStableCallback;
//# sourceMappingURL=useStableCallback.js.map