Vigyata.AI
Is this your channel?

React 19 Tutorial - 27 - useReducer Hook

5.2K views· 140 likes· 4:51· Dec 8, 2025

🛍️ Products Mentioned (2)

Github - https://github.com/gopinav/React-19-Tutorials Become a Fullstack Developer with Scrimba - https://scrimba.com/fullstack-path-c0fullstack?via=Codevolution Follow me + Twitter - https://twitter.com/CodevolutionWeb Business - codevolution.business@gmail.com useReducer Hook in React 19

About This Video

In this lesson, I introduce the useReducer hook in React 19 as another way to manage state alongside useState. Up to this point in the course, we’ve handled state in all shapes—numbers, strings, booleans, objects, and arrays—using useState. But instead of jumping straight into “why useReducer?”, I take a different approach: I first break down what it is and how it works, so the “when should I use it?” becomes obvious once you’ve seen it in action. To understand the name “reducer,” I step away from React and look at plain JavaScript: Array.prototype.reduce. The key idea is that reduce takes many values and reduces them into a single value, and the reducer function defines how that happens. React’s useReducer borrows that same concept, but applies it to state management. In useReducer, the reducer function takes the current state and an action (a message describing what happened), and returns a new state. The hook gives you back the current state and a dispatch function, and dispatch is how you send actions to trigger state updates. Once these pieces—reducer, action, dispatch—click, useReducer becomes a really clean way to structure more complex state updates.

Frequently Asked Questions

🎬 More from Codevolution