Skip to content

processReturn plus processMultiple #154

Open
@adambiltcliffe

Description

@adambiltcliffe

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions