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

/**
 * Run an effect only once, on mount
 * @param effect An effect to run only once, on mount
 */ const useMountEffect = (effect)=>{
    const effectRef = _(effect);
    p(()=>effectRef.current(), []);
};

export { useMountEffect };
//# sourceMappingURL=useMountEffect.mjs.map
