Handle asynchronous work in Redux when an action needs to do more than update state immediately.
A thunk lets you dispatch a function instead of a normal action object. This is useful when something needs to happen asynchronously, such as fetching data from an API before updating the Redux state.
Redux Toolkit includes thunk middleware by default and provides createAsyncThunk to make common async workflows easier. It can automatically generate pending, fulfilled, and rejected states so your application can handle loading, success, and error conditions cleanly.
What you'll walk away knowing