import * as React from 'react'; /** * Hook which asynchronously executes a callback once the component has been mounted. * * @param callback - Function to call before mount. */ export var useMount = function (callback) { var mountRef = React.useRef(callback); mountRef.current = callback; React.useEffect(function () { var _a; (_a = mountRef.current) === null || _a === void 0 ? void 0 : _a.call(mountRef); }, []); }; //# sourceMappingURL=useMount.js.map