Before we can use Redux, we need to install it, along with the TypeScript types. We will also install an additional library called Redux Thunk, which we need in order to implement asynchronous actions. Let's look at the steps to install Redux:
- If we haven't already, let's open our project in Visual Studio Code from where we left off in the previous chapter. We can install the core Redux library via the Terminal with the following command:
> npm install redux
Note that the core Redux library contains TypeScript types within it, so there is no need for an additional install for these.
- Now, let's install the React-specific bits for Redux in the Terminal with the following command:
> npm install react-redux
These bits allow us to connect our React components to the Redux store.
- Let's also install the TypeScript...