Course lesson

Manage State and Respond to User Events in a Class Component

Before the hooks API was introduced, class components were the only way to create stateful components. With countless class-based React components in the wild, you'll need to know how to support them, even if other parts of your code base use hooks. In this...

Duration
4 min
Access
Free
Transcript
Available

Before the hooks API was introduced, class components were the only way to create stateful components. With countless class-based React components in the wild, you'll need to know how to support them, even if other parts of your code base use hooks. In this lesson, we'll handle user events and update the component's state in response to those events with React's setState method.