import { useRef, useEffect } from 'react';

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

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