oo-redux-utils
Advanced tools
Comparing version 1.4.1 to 1.5.0
@@ -19,3 +19,3 @@ "use strict"; | ||
function () { | ||
function AbstractAction(stateNamespace) { | ||
function AbstractAction(stateNamespace, dispatchAction) { | ||
_classCallCheck(this, AbstractAction); | ||
@@ -25,3 +25,6 @@ | ||
_defineProperty(this, "dispatchAction", void 0); | ||
this.stateNamespace = stateNamespace; | ||
this.dispatchAction = dispatchAction; | ||
} | ||
@@ -28,0 +31,0 @@ |
@@ -12,2 +12,4 @@ "use strict"; | ||
var _DispatchUtils = _interopRequireDefault(require("./DispatchUtils")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -49,10 +51,15 @@ | ||
_createClass(AbstractComponent, [{ | ||
key: "dispatch", | ||
value: function dispatch(action, componentType) { | ||
var dispatch = this.props.dispatch; | ||
dispatch({ | ||
type: action, | ||
receivingComponentType: componentType | ||
}); | ||
key: "dispatchAction", | ||
value: function dispatchAction(action) { | ||
var dispatchAction = _DispatchUtils.default.createActionDispatcher(this.props.dispatch); | ||
dispatchAction(action); | ||
} | ||
}, { | ||
key: "dispatchActionToComponentType", | ||
value: function dispatchActionToComponentType(action, componentType) { | ||
var dispatchActionToComponentType = _DispatchUtils.default.createActionDispatcherToComponentType(this.props.dispatch); | ||
dispatchActionToComponentType(action, componentType); | ||
} | ||
}]); | ||
@@ -59,0 +66,0 @@ |
@@ -24,2 +24,14 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "DispatchAction", { | ||
enumerable: true, | ||
get: function get() { | ||
return _DispatchUtils.DispatchAction; | ||
} | ||
}); | ||
Object.defineProperty(exports, "DispatchActionToComponentType", { | ||
enumerable: true, | ||
get: function get() { | ||
return _DispatchUtils.DispatchActionToComponentType; | ||
} | ||
}); | ||
@@ -32,3 +44,5 @@ var _OOReduxUtils = _interopRequireDefault(require("./OOReduxUtils")); | ||
var _DispatchUtils = require("./DispatchUtils"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "oo-redux-utils", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"description": "Utility functions for Object-oriented Redux", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
38091
21
241