In this section, we'll connect the Products page to our store. The first job is to add the React Redux Provider component which we'll do in the next section.
Connecting our React app to the store
Adding the store Provider component
The Provider component can pass the store to components beneath it at any level. So, in this section we are going to add Provider right at the top of our component hierarchy so that all our components can access it:
- Let's open our existing index.tsx and import the Provider component from React Redux:
import { Provider} from "react-redux";
- Let's also import the Store type from React Redux:
import { Store } from "redux";
- The final thing we need to import...