import '../../../../preact/compat/dist/compat.module.mjs';
import { useEffect as p } from '../../../../preact/hooks/dist/hooks.module.mjs';

const EMPTY = [];

/**
 * A React.useEffect equivalent that runs once, when the component is mounted.
 */
function useOnMount(fn) {
  // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array
  /* eslint-disable react-hooks/exhaustive-deps */
  p(fn, EMPTY);
  /* eslint-enable react-hooks/exhaustive-deps */
}

export { useOnMount as default };
//# sourceMappingURL=useOnMount.mjs.map
