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

10 lines (9 loc) 224 B
import { useEffect, useRef } from 'react'; var usePrevious = function (value) { var ref = useRef(); useEffect(function () { ref.current = value; }); return ref.current; }; export default usePrevious;