useReducer Hook
useReducer moves state transitions into a pure (state, action) => newState reducer and gives components a dispatch function that is stable across renders. It centralizes multi-field update logic, makes transitions unit-testable without rendering, and avoids threading many setters through props.
This Concept is waiting for its first lesson!
useReducer moves state transitions into a pure (state, action) => newState reducer and gives components a dispatch function that is stable across renders. It centralizes multi-field update logic, makes transitions unit-testable without rendering, and avoids threading many setters through props.
Are you a teacher? Sign in to start contributing.
Sign In