import { o as n } from "./rolldown-runtime.js";
import { i as s } from "./vendor/react.js";
import { n as c, t as o } from "./useIsoLayoutEffect.js";
var f = /* @__PURE__ */ n(s());
function p(r, a) {
  const t = f.useRef(r), e = c(a);
  o(() => {
    t.current !== r && e(t.current);
  }, [r, e]), o(() => {
    t.current = r;
  }, [r]);
}
export {
  p as t
};

//# sourceMappingURL=useValueChanged.js.map