State management with Redux is actually really similar to using a Reducer Hook. We first define the state object, then actions, and finally, our reducers. An additional pattern in Redux is to create functions that return action objects, so-called action creators. Furthermore, we need to wrap our whole app with a Provider component, and connect components to the Redux store in order to be able to use Redux state and action creators.
Handling state with Redux
Installing Redux
First of all, we have to install Redux, React Redux, and Redux Thunk. Let us look at what each one does individually:
- Redux itself just deals with JavaScript objects, so it provides the store, deals with actions and action creators, and handles reducers...