Redux has a Provider component (technically, it's the react-redux package that provides it), which is used to wrap the top-level components of your application. This will ensure that Redux store data is available to every component in your application.
In the hipster newsreader app you're developing, you'll wrap the Router component with a Provider component. Then, as you build your components, you know that store data will be available. Here's what the Root component looks like:
import React from "react";
import { Provider } from "react-redux";
import store from "../store";
import App from "./App";
export default function Root() {
return (
<Provider store={store}>
<App />
</Provider>
);
}
The store that you created by taking the initial state and combining it with reducer functions is passed to <Provider>. This means that, when your reducers cause the Redux store to change...