@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
22 lines (18 loc) • 468 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = require("react");
var useIsMountedRef = function useIsMountedRef() {
var isMountedRef = (0, _react.useRef)(null);
(0, _react.useEffect)(function () {
isMountedRef.current = true;
return function () {
isMountedRef.current = false;
};
});
return isMountedRef;
};
var _default = useIsMountedRef;
exports.default = _default;