We are currently loading the bookmarks from hardcoded data in the action. In a real app, we're much more likely to be getting data back from an API. In this recipe, we'll use a Redux middleware to help with the process of fetching data from an API.
Communicating with a remote API
Getting ready
In this recipe, we'll be using axios to make all AJAX requests. Install it with npm:
npm install --save axios
Or you can install it with yarn:
yarn add axios
For this recipe, we'll be using the Redux middleware, redux-promise-middleware. Install the package with npm:
npm install --save redux-promise-middleware
Or you can install it with yarn:
yarn add redux-promise-middleware
This middleware will create and automatically...