React · Junior · Question 43 of 75
What's required of a reducer in classic Redux (without Immer)?
- ✓Correct answer: To be pure and return new state without mutations
- 2To be async and make API requests on its own
- 3To change
statedirectly and return nothing
Explanation
(state, action) => newState with no side effects: no requests, random numbers or mutations. Async logic goes into thunks or RTK Query. In Redux Toolkit you can write "mutating" code - Immer turns it into immutable updates under the hood.