From the course: Building Modern Projects with React

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Dispatching Redux actions

Dispatching Redux actions

- [Instructor] Alright, so at this point, our to-do list is loading its data from Redux, but we still need to make it so that whenever something happens in the application, right, whenever a button is clicked, for example, the Redux store is updated and we see those changes updated in the interface. Now, Redux takes care of most of this for us. All we really have to do is dispatch actions from inside our components. So here's what this is going to look like, and just as a reminder, in the previous chapter, I talked about how this kind of props drilling, right, having the same prop that's passed down through multiple components, right? We have onCompleteClicked passed down from app.jsx, right? If you take a look here, we see that that's getting passed down here and then it's getting passed all the way down to the TodoList item, which is the one that actually calls it, right? This is really a very difficult thing to manage over time and it can really make a mess of your React…

Contents