UNPKG

react-async-iterators

Version:

The magic of JavaScript async iterators in React ⛓️ 🧬 🔃

10 lines 306 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useLatest = useLatest; const react_1 = require("react"); function useLatest(nextValue) { const ref = (0, react_1.useRef)(nextValue); ref.current = nextValue; return ref; } //# sourceMappingURL=useLatest.js.map