1×
Become a member
to unlock all features

Level Up!

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

Autoplay

    Update state in React with the update function provided by the `useState` hook

    reactReact

    In this lesson, we implement a "shortlisting" functionality to allow users to click on a name to add it to their shortlist. We use the useState hook to maintain that shortlist, and use the update function it provides to amend the list when a user clicks on a name.