"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.usePrevious = usePrevious; var React = require("react"); /** * Hook keeping track of a given value from a previous execution of the component the Hook is used in. * * See [React Hooks FAQ](https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state) */ function usePrevious(value) { var ref = React.useRef(undefined); React.useEffect(function () { ref.current = value; }); return ref.current; } //# sourceMappingURL=usePrevious.js.map