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
From the course: Building Modern Projects with React
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…
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.
Contents
-
-
-
-
-
-
Why do you need Redux Thunk?1m 57s
-
(Locked)
How does Redux Thunk work?2m 51s
-
(Locked)
Adding Redux Thunk to React2m 30s
-
(Locked)
Creating a thunk3m 30s
-
(Locked)
The Todos API2m 18s
-
(Locked)
Async thunks5m 56s
-
(Locked)
Adding another reducer7m 19s
-
(Locked)
Refactoring the todos reducer2m 50s
-
(Locked)
Using thunks to create server resources5m 58s
-
(Locked)
Using thunks to delete server resources4m 46s
-
(Locked)
Challenge: Using thunks to update server resources1m 14s
-
(Locked)
Solution: Using thunks to update server resources3m 34s
-
-
-
-
-