"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useRefFunction = void 0;
require("core-js/modules/es.array.iterator.js");
require("core-js/modules/web.dom-collections.iterator.js");
var _react = require("react");
const useRefFunction = reFunction => {
  const ref = (0, _react.useRef)(null);
  ref.current = reFunction;
  return (0, _react.useCallback)((...rest) => {
    var _ref$current;
    return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.call(ref, ...rest);
  }, []);
};
exports.useRefFunction = useRefFunction;