UNPKG

oo-redux-utils2

Version:
22 lines 704 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class Controller { constructor(reduxDispatch) { this.dispatch = (action) => reduxDispatch({ type: action }); } dispatchWithDi(ActionClass, diContainer, otherArgs) { diContainer .create(ActionClass, { ...otherArgs, }) .then((action) => this.dispatch(action)); } getCachedActionDispatchers(actionDispatchers) { if (!this.cachedActionDispatchers) { this.cachedActionDispatchers = actionDispatchers; } return this.cachedActionDispatchers; } } exports.default = Controller; //# sourceMappingURL=Controller.js.map