MemotivaReact Hooks Basics

What does useReducer do?

React Hooks Basics

Audio flashcard · 0:12

Nortren·

What does useReducer do?

0:12

useReducer is a hook for managing more complex state logic. It takes a reducer function and an initial state, and returns the current state plus a dispatch function. You call dispatch with an action to produce the next state.