redux-axios-middleware icon indicating copy to clipboard operation
redux-axios-middleware copied to clipboard

Why is the response used next by default?

Open acrius opened this issue 7 years ago • 0 comments

Hello! Many thanks to you for the work. I have a question. Why is the response used next by default? In this case, the action with the request goes through the chain of middlewares only after redux-axios-middleware. Thus, if we do, for example, the middleware of authentification, we will have to:

  1. Divide the middleware fo authentification into two to process the request and response. Insert them before and after redux-axios-middleware.
  2. Override onSuccess and onError methods in options. Why not call dispatch by default? Thanks!

acrius avatar Mar 23 '18 10:03 acrius