import { useRef as u, useMemo as i } from "react";
import { isFunction as a } from "../utils/index.mjs";
import c from "../utils/isDev.mjs";
function p(r) {
  c && (a(r) || console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof r)));
  var n = u(r);
  n.current = i(function() {
    return r;
  }, [r]);
  var t = u();
  return t.current || (t.current = function() {
    for (var o = [], e = 0; e < arguments.length; e++)
      o[e] = arguments[e];
    return n.current.apply(this, o);
  }), t.current;
}
export {
  p as default
};
