UNPKG

@git-temporal/git-temporal-react

Version:

<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

12 lines (11 loc) 303 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const react_1 = require("react"); function usePrevious(value) { const ref = react_1.useRef(); react_1.useEffect(() => { ref.current = value; }); return ref.current; } exports.usePrevious = usePrevious;