Chapter 5
Handling Server Data
Section 3
Using Promises to Fire Actions Before and After HTTP Requests
We need another concise way to handle the async action creator, promise middleware is a perfect option for that. - Install required lib which is redux-promise-middleware And configure it in the store - Convert the async action creator to use the style of promise middleware and clean up the unnecessary code - Refactor the reducer to handle the pending, fulfilled, and rejected actions based on the promise middleware