Async Logic with createAsyncThunk
Handle API calls in Redux with createAsyncThunk and the pending/fulfilled/rejected lifecycle.
Welcome
In this lesson you will handle API calls in Redux with createAsyncThunk and handle the pending, fulfilled, and rejected lifecycle actions in your slice.
What Is createAsyncThunk?
createAsyncThunk generates a thunk action creator that dispatches three lifecycle actions automatically: pending (started), fulfilled (resolved), and rejected (failed). You handle each in extraReducers.
All lessons in this course
- Redux Toolkit Slices & createSlice
- Async Logic with createAsyncThunk
- RTK Query: Endpoints & Auto-Caching
- Optimistic Updates & Cache Invalidation