After encountering performance issues with npm
, I made the switch to the yarn
package manager. Everything seemed to be smooth sailing until I noticed a discrepancy with redux-multi when compared to how it functioned with npm
. Has anyone else faced this issue before? What would be the most optimal solution without having to modify my application's code?
Yarn:
function multi(_ref) {
var dispatch = _ref.dispatch;
return function (next) {
return function (action) {
return Array.isArray(action) ? Promise.all(action.filter(Boolean).map(function (p) {
return dispatch(p);
})) : next(action);
};
};
}
Npm:
function multi(_ref) {
var dispatch = _ref.dispatch;
return function (next) {
return function (action) {
return Array.isArray(action) ? action.filter(Boolean).map(dispatch) : next(action);
};
};
}
One key difference is that the yarn version utilizes Promise
.