Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

React Redux Thunk Middleware in Redux Toolkit for Async Actions with Axios

Dave Gray via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This tutorial teaches React developers to use Redux Toolkit and thunk middleware for asynchronous API actions. It covers fetching and posting data with Axios, handling loading states, and updating Redux state through extraReducers.

Syllabus

Intro
Welcome
Prerequisite knowledge
Faster Pace Ahead
What is a thunk?
Changing the initial state
Adjusting to the state shape
Creating a fetchPosts async thunk
Adding extraReducers and builder cases
Dispatching fetchPosts async thunk
Building a PostsExcerpt component
Displaying the loading state
Creating a fetchUsers async thunk
Dispatching fetchUsers at App load time
Creating an addNewPost async thunk
Dispatching the addNewPost async thunk
Quick Correction
Do not use try / catch blocks here as the video shows. You need the promise to be fulfilled or rejected which will have the appropriate response in the extraReducers.

Taught by

Dave Gray

Reviews

Start your review of React Redux Thunk Middleware in Redux Toolkit for Async Actions with Axios

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.