Главная
Study mode:
on
1
Intro
2
Welcome
3
Prerequisite knowledge
4
Faster Pace Ahead
5
What is a thunk?
6
Changing the initial state
7
Adjusting to the state shape
8
Creating a fetchPosts async thunk
9
Adding extraReducers and builder cases
10
Dispatching fetchPosts async thunk
11
Building a PostsExcerpt component
12
Displaying the loading state
13
Creating a fetchUsers async thunk
14
Dispatching fetchUsers at App load time
15
Creating an addNewPost async thunk
16
Dispatching the addNewPost async thunk
17
Quick Correction
18
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.
Description:
Learn how to implement async actions using Redux Thunk middleware and Axios in Redux Toolkit. Explore the concept of thunks, create async thunks for fetching posts and users, and build a PostsExcerpt component. Discover how to handle loading states, dispatch async thunks at app load time, and create an addNewPost async thunk. Gain insights into adjusting initial state, adding extraReducers with builder cases, and avoiding common pitfalls when working with promises in Redux.

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

Dave Gray
Add to list