Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Declaratively Interact with Complex Component State using the React useReducer Hook


    Having to use useState for every item in your state quickly gets cumbersome. In this lesson, we’ll learn how to refactor our component to use useReducer instead.

    We'll cover:

    • Creating an initial state with useReducer
    • Making a reducer function that makes changes to the state based on incoming dispatches