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

Adding Redux Thunk to React

From the course: Building Modern Projects with React

Start my 1-month free trial

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.…

Contents