From the course: Building Modern Projects with React
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
The Todos API
- [Instructor] In the previous video, the Thunk that we created was extremely simple. It was also synchronous since the actual operations performed by our Thunk were synchronous. However, most of the time this is not the case. In a real world web application, we'll be using our Thunks for many different asynchronous tasks, such as loading or updating server data. We're going to take a look at how to create Thunks that do this sort of work for us, but first, we need a back end that we can query from our React application. Now, I've created a simple Node server for us to use in this course. In order to use it, you just have to download the project and once you've downloaded it, you need to navigate to that directory using a terminal and run npm install and once that completes you need to run npm run start and you'll see a message saying that the server is now listening on local host port 8080. So, just to give you a brief…
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
-
How does Redux Thunk work?2m 51s
-
Adding Redux Thunk to React2m 30s
-
Creating a thunk3m 30s
-
The Todos API2m 18s
-
Async thunks5m 56s
-
Adding another reducer7m 19s
-
Refactoring the todos reducer2m 50s
-
Using thunks to create server resources5m 58s
-
Using thunks to delete server resources4m 46s
-
Challenge: Using thunks to update server resources1m 14s
-
Solution: Using thunks to update server resources3m 34s
-
-
-
-
-