Closed rubensdemelo closed 5 years ago
With the redux_thunk middleware, you don't need other middleware to make async calls. See the demo in README.md, and also my addition here: https://github.com/brianegan/redux_thunk/pull/9/commits/53098991bfc4482c22ea8a699ef9a18ba91f9342
Hey sorry -- somehow missed this one...
Yah, folks in the JS community invented Thunks as an alternative to Middleware for async tasks, so as @yoavrofe has said, you shouldn't need both a Thunk and a Middleware for the same async task.
Thank you for reply guys. So, a good practice to follow the redux pattern is use middleware for async calls, correct ? ( I can make async calls in action without redux_thunk or middleware, but it isnt the normal flow ).
Once I can dispach an async request in my action, what is middleware function?