From the course: Building Modern Projects with React

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Using thunks to update server resources

Challenge: Using thunks to update server resources

From the course: Building Modern Projects with React

Start my 1-month free trial

Challenge: Using thunks to update server resources

(bright music) - [Instructor] Okay, so we've already seen how to use thunks to create, read and delete resources on the server. The final step is to create a thunk that allows us to update resources on the server. Your challenge in this video is to implement the flow for marking to do as completed. This will build off the work you did in the previous challenge where you created the action and reducer logic for marking to do as completed as well as dispatch this action when the mark is completed button was clicked. So before you start this challenge, there are a couple things to keep in mind. The first is about the request. You're going to want to send a post request to to-do's slash ID slash completed, and keep in mind also that this endpoint will give you back the entire updated to-do as the response. The second thing to keep in mind is that just like in the previous videos, you'll almost definitely need to make some…

Contents