Introduction
Installation
First, install the middleware.
Setup
Import the middleware and include it in applyMiddleware
when creating the Redux store:
Use
Dispatch a promise as the value of the payload
property of the action.
A pending action is immediately dispatched.
Once the promise is settled, a second action will be dispatched. If the promise is resolved a fulfilled action is dispatched.
On the other hand, if the promise is rejected, a rejected action is dispatched.
That's it!
Further Reading
Copyright (c) 2017 Patrick Burtchaell. Code licensed with the MIT License (MIT). Documentation licensed with the CC BY-NC License.
Last updated