"use strict";

exports.__esModule = true;
exports.usePrevious = usePrevious;
var _react = require("react");
function usePrevious(value, defaultValue) {
  var [current, setCurrent] = (0, _react.useState)(value);
  var [previous, setPrevious] = (0, _react.useState)(defaultValue);
  if (value !== current) {
    setPrevious(current);
    setCurrent(value);
  }
  return previous;
}
//# sourceMappingURL=hooks.js.map