Problem Statement
When should you use extraReducers in createSlice?
Explanation
extraReducers allows a slice to respond to actions that were defined elsewhere, such as actions from createAsyncThunk or actions from other slices, without generating action creators for them. This is essential for handling async logic states like pending, fulfilled, and rejected from thunks, or for responding to cross-slice actions. The builder callback pattern in extraReducers provides better TypeScript support and clearer intent.
