"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLatest = void 0;
const react_1 = require("react");
const useLatest = (value) => {
    const ref = (0, react_1.useRef)(value);
    ref.current = value;
    return (0, react_1.useCallback)(() => ref.current, []);
};
exports.useLatest = useLatest;
