Async for Reduxs
Async logic in Redux handles work that cannot run inside a reducer, such as API requests and timers. The standard tool is createAsyncThunk, which dispatches pending, fulfilled and rejected actions around a promise. For more complex flows, listener middleware or sagas react to actions and run side effects.
Stage: Building Features · Part of the Redux roadmap · Last reviewed 19 November 2026
What to learn in Async
- Write a thunk with createAsyncThunk that calls an API
- Handle pending, fulfilled and rejected cases in extraReducers
- Track loading and error status in slice state
- Read other state inside a thunk using getState
- Run an effect in response to an action with listener middleware
Async interview questions
What actions does createAsyncThunk dispatch?
It dispatches a pending action when the payload creator starts, then either a fulfilled action with the returned value or a rejected action with the error. You respond to these in extraReducers to set loading flags, store data or record failures.
Where should side effects live in a Redux app?
Outside reducers. Put request logic in thunks, or in RTK Query endpoints, and put reactive effects in listener middleware or components. Reducers should only calculate the next state from an action, so they stay pure and testable.
Where Async fits in the Redux roadmap
Async belongs to the Building Features stage (intermediate level). Real apps.
Other units in this stage
Back to the full Redux roadmap