Overview
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