processReturn plus processMultiple
adambiltcliffe opened this issue · 0 comments
adambiltcliffe commented
It's possible to set dispatchReturn to true explicitly but also accidentally enable dispatchMultiple implicitly by including the full signature of the process hook:
processOptions: {
dispatchReturn: true,
successType: auth.actions.logout_success,
failType: auth.actions.logout_failure
},
process({ getState, action, client }, dispatch, done) {
return client.logout();
}
This combination can only ever be an error (the logic cannot end), but redux-logic does not warn you about it until the warnTimeout is reached. It seems like it would be beneficial to log an error in development mode along the lines of "You should not include dispatch or done as arguments to process() if processOptions.dispatchReturn is set to true".