CHAPTER 04

State and Events From Scratch

Every subchapter in this chapter, free to read online. Work through them in order, or open the concept required by your current project.

04
chapter
6
subchapters
Free
online
01
Subchapter

Click Handlers and Event Props

Respond to browser interaction by passing handler functions, reading the event object, and controlling default behavior only when required.

02
Subchapter

The First useState Hook

Give one component instance stored memory with useState and request its next render from a click handler.

03
Subchapter

State Updates and Renders

Read state as a render snapshot, process queued updater functions, replace objects without mutation, and trace the resulting commit.

04
Subchapter

Form Inputs and Controlled Values

Connect text, checkbox, radio, and select controls to state while preserving labels, browser validation, and form submission behavior.

05
Subchapter

Derived UI From State

Store the smallest independent state and calculate filters, counts, labels, selections, and form validity during rendering.

06
Subchapter

Resetting the Small App

Reset stored values from one event, preserve state by component position, and change a key only when the whole instance represents another identity.

Other chapters

4 more