"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = require("react");
const usePrevious = state => {
  const ref = (0, _react.useRef)();
  (0, _react.useEffect)(() => {
    ref.current = state;
  });
  return ref.current;
};
var _default = usePrevious;
exports.default = _default;