"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
exports.useAsyncEffect = function (asyncCallback, deps) {
    react_1.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