import {
  require_react
} from "/build/_shared/chunk-PECDPABK.js";
import {
  createHotContext,
  init_remix_hmr
} from "/build/_shared/chunk-G7KTOMTD.js";
import {
  __toESM
} from "/build/_shared/chunk-PNG5AS42.js";

// app/hooks/useEffectOnce.ts
init_remix_hmr();
var import_react = __toESM(require_react(), 1);
if (import.meta) {
  import.meta.hot = createHotContext(
    //@ts-expect-error
    "app/hooks/useEffectOnce.ts"
  );
  import.meta.hot.lastModified = "1710795853618.3342";
}
var useEffectOnce = (effect) => {
  (0, import_react.useEffect)(effect, []);
};

// app/hooks/useUnmount.ts
init_remix_hmr();
var import_react2 = __toESM(require_react(), 1);
if (import.meta) {
  import.meta.hot = createHotContext(
    //@ts-expect-error
    "app/hooks/useUnmount.ts"
  );
  import.meta.hot.lastModified = "1710795853618.7773";
}
var useUnmount = (fn) => {
  const fnRef = (0, import_react2.useRef)(fn);
  fnRef.current = fn;
  useEffectOnce(() => () => fnRef.current());
};

export {
  useEffectOnce,
  useUnmount
};
//# sourceMappingURL=/build/_shared/chunk-7NMI3PDC.js.map
