import { useState as o, useMemo as n, useEffect as c } from "react";
import { i as m } from "./isEqual.Bk3xqtBB.js";
function y(t) {
  const [e, u] = o(t), [r, f] = o(!1), s = n(() => t instanceof Function ? t() : t, [t]);
  return c(() => {
    r || m(e, s) || f(!0);
  }, [e, t, r, s]), [e, u, r];
}
export {
  y as u
};
