import { useEffect } from 'react';
export var useAsyncEffect = function (asyncCallback, deps) {
    useEffect(function () {
        var promise = asyncCallback();
        return function () {
            promise.then(function (unsubscribe) { return unsubscribe && unsubscribe(); }, function (e) { return console.error(e); });
        };
    }, deps);
};
//# sourceMappingURL=useAsyncEffect.js.map