function usePrevious(value) {
  var ref = Object(react["useRef"])(null);
  Object(react["useEffect"])(function () {
    ref.current = value;
  }, [value]);
  return ref.current;
}
Returns the previous value of a reference after a component update.

@param value