This commit is contained in:
24
node_modules/react-redux/lib/utils/bindActionCreators.js
generated
vendored
Normal file
24
node_modules/react-redux/lib/utils/bindActionCreators.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = bindActionCreators;
|
||||
|
||||
function bindActionCreators(actionCreators, dispatch) {
|
||||
var boundActionCreators = {};
|
||||
|
||||
var _loop = function _loop(key) {
|
||||
var actionCreator = actionCreators[key];
|
||||
|
||||
if (typeof actionCreator === 'function') {
|
||||
boundActionCreators[key] = function () {
|
||||
return dispatch(actionCreator.apply(void 0, arguments));
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in actionCreators) {
|
||||
_loop(key);
|
||||
}
|
||||
|
||||
return boundActionCreators;
|
||||
}
|
||||
Reference in New Issue
Block a user