import f from "../../../fast-deep-equal/index.es.js";
import { useState as r, useCallback as a } from "react";
import { useIsomorphicLayoutEffect as i } from "./useIsomorphicLayoutEffect.es.js";
function n(e, c, t) {
  const [o, u] = r(
    () => c(e)
  ), l = a(() => {
    const s = c(e);
    f(o, s) || (u(s), t && t());
  }, [
    o,
    e,
    t
  ]);
  return i(l), [
    o,
    l
  ];
}
export {
  n as useCollector
};
//# sourceMappingURL=useCollector.es.js.map
