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.
Adding Redux Thunk to React
From the course: Building Modern Projects with React
Adding Redux Thunk to React
- [Instructor] So now we know some of the basic theory behind what Redux Thunk is and how it works. Don't worry too much if it doesn't make complete sense yet. We'll see some examples very soon. In this video, we're going to add Redux Thunk to our project. So let's start off by installing the packages we'll need. Open up a terminal inside our projects directory and type npm install redux-thunk, which is the actual package for Thunk, redux-devtools-extension, which we'll be using to add the Thunk middleware to our Redux store in a nice, neat way, and @babel/runtime, which we need to add to our project to make our asynchronous Thunks work. So let's install those packages. And once we've done that, we're going to install just one more thing. We're going to say npm install --save-dev @babel/plugin-transform-runtime. And this is the development version of the Babel runtime package we just installed. So hit enter and install that.…
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
-
-
-
-
-