"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useCallbackRef = void 0;
const react_1 = __importDefault(require("react"));
function useCallbackRef(callback) {
    const callbackRef = react_1.default.useRef(callback);
    callbackRef.current = callback;
    return react_1.default.useMemo(() => ((...args) => callbackRef.current?.(...args)), []);
}
exports.useCallbackRef = useCallbackRef;
//# sourceMappingURL=useCallbackRef.js.map