import { useRef as u } from "react";
import { isEqual as o } from "es-toolkit/compat";
const i = (e, t) => {
  const r = u({ target: e, previous: e });
  return (t ? !t(e, r.current.target) : !o(e, r.current.target)) && (r.current.previous = r.current.target, r.current.target = e), r.current.previous;
};
export {
  i as default
};
//# sourceMappingURL=usePrevious.js.map
