Conceptual
Login

createAsyncThunk

A thunk is a dispatched function that receives `(dispatch, getState)` and may run async work; `createAsyncThunk` standardizes the pattern by generating pending/fulfilled/rejected action types around a promise-returning payload creator. Slices handle those lifecycle actions in `extraReducers` to track loading and error state.

This Concept is waiting for its first lesson!

A thunk is a dispatched function that receives `(dispatch, getState)` and may run async work; `createAsyncThunk` standardizes the pattern by generating pending/fulfilled/rejected action types around a promise-returning payload creator. Slices handle those lifecycle actions in `extraReducers` to track loading and error state.

Are you a teacher? Sign in to start contributing.

Sign In