UNPKG

@open-tender/store

Version:

A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API

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