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.
Click Handlers and Event Props
Respond to browser interaction by passing handler functions, reading the event object, and controlling default behavior only when required.
The First useState Hook
Give one component instance stored memory with useState and request its next render from a click handler.
State Updates and Renders
Read state as a render snapshot, process queued updater functions, replace objects without mutation, and trace the resulting commit.
Form Inputs and Controlled Values
Connect text, checkbox, radio, and select controls to state while preserving labels, browser validation, and form submission behavior.
Derived UI From State
Store the smallest independent state and calculate filters, counts, labels, selections, and form validity during rendering.
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.