MemotivaReact Hooks Basics

What does useState do?

React Hooks Basics

Audio flashcard · 0:10

Nortren·

What does useState do?

0:10

useState is a hook that adds local state to a functional component. It returns an array with the current state value and a function to update it. Calling the updater schedules a re-render with the new value.