Files
copilot-toolbox-template-123/node_modules/@ant-design/pro-utils/lib/hooks/useLatest/index.js
2026-01-09 14:52:46 +00:00

15 lines
366 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.useLatest = void 0;
var _react = require("react");
/**
* @see https://github.com/streamich/react-use/blob/master/docs/useLatest.md
*/
var useLatest = exports.useLatest = function useLatest(value) {
var ref = (0, _react.useRef)(value);
ref.current = value;
return ref;
};