QuizNot attempted
Sequential dispatches compound
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
2
- Each
dispatchqueues an action, and the reducer receives the state produced by the previous queued action, exactly like a functional updater, so twoincactions compound: 0→1→2. - Not 1: that is the stale
setCount(count + 1)pattern - reducers don't read render-time values.
- Not 0: both dispatches apply on the next render.
- Not NaN:
state.countis a number.