"use strict";
"use client";
'use strict';

var React = require('react');

function usePrevious(value) {
  const [current, setCurrent] = React.useState(value);
  const [previous, setPrevious] = React.useState();
  if (!Object.is(value, current)) {
    setPrevious(current);
    setCurrent(value);
  }
  return previous;
}

exports.usePrevious = usePrevious;
