From the course: Building React and ASP.NET Core Applications
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Connecting the dots
From the course: Building React and ASP.NET Core Applications
Connecting the dots
- (Narrator) We have created the actions, the reducers, and the store. Now it's time to connect all these three together so we can load all the trips by using the redux instead of just calling them directly from our component to web API. So let's go to Visual Code and see this in action. The first thing that we need to do in here is that we need to go to ClientApp, src, and then index.js. In here, just after the App import, we are going to make some more imports. So let us start with the first one. So in here, write import Provider from react-redux. Then next, we are going to import the configureStore. So import configureStore from, then ./store/store. Now just before the reactDOM.render, we're going to write const store is equal to configureStore, and then pass as a parameter an empty object. Now we are going to pass this store in our render method. So let us wrap the whole BrowserRouter inside the render. For that, I'll just…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.