State Management · Middle · Question 15 of 75
What is extraReducers in createSlice for?
- ✓Correct answer: Handling actions defined outside this slice (thunks, other slices)
- 2Adding more reducers than the 10-reducer limit of
reducers - 3Registering middleware for the slice
Explanation
reducers creates the slice's own actions, while extraReducers reacts to external ones: builder.addCase(fetchUser.fulfilled, ...) or builder.addCase(logout, () => initialState).