UNPKG

react-native-story-component

Version:
20 lines (18 loc) 531 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = require("react"); const useMountEffect = effect => { if (typeof effect !== 'function') { console.error('Effect must be a function'); } (0, _react.useEffect)(() => { effect === null || effect === void 0 ? void 0 : effect(); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); }; var _default = useMountEffect; exports.default = _default; //# sourceMappingURL=useMountEffect.js.map