React 19+ · Hook
useReducer
useReducer lets a component manage state with a reducer. You dispatch actions, and the reducer returns the next state.
Last updated
Syntax
const [state, dispatch] = useReducer(reducer, initialArg, init?)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
useStateflushSyncdispatchreducerinitializer function