Async Flow
Last updated
Last updated
Without , Redux store only supports . This is what you get by default with .
You may enhance with . It is not required, but it lets you .
Asynchronous middleware like or wraps the store's method and allows you to dispatch something other than actions, for example, functions or Promises. Any middleware you use can then intercept anything you dispatch, and in turn, can pass actions to the next middleware in the chain. For example, a Promise middleware can intercept Promises and dispatch a pair of begin/end actions asynchronously in response to each Promise.
When the last middleware in the chain dispatches an action, it has to be a plain object. This is when the takes place.
Check out .
Now that you've seen an example of what middleware can do in Redux, it's time to learn how it actually works, and how you can create your own. Go on to the next detailed section about .