UNPKG

react-native-story-component

Version:
13 lines (12 loc) 389 B
import { useEffect } from 'react'; const useMountEffect = effect => { if (typeof effect !== 'function') { console.error('Effect must be a function'); } useEffect(() => { effect === null || effect === void 0 ? void 0 : effect(); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); }; export default useMountEffect; //# sourceMappingURL=useMountEffect.js.map