liveBook · Manning

Radio button

As explained in React Quickly, Second Edition

A radio button is an HTML input control representing one mutually exclusive choice within a group.

A radio button represents one choice in a mutually exclusive group. Its value identifies the choice; checked records whether it is selected. section 9.2.5

Controlled priority choices

Store the selected priority in state, give every input the same name, and derive checked from the current value: <input type="radio" name="importance" value={value} checked={value === current} onChange={onChange} />. Update state from evt.target.value. section 9.2.5

How React Quickly, Second Edition covers it

How deep it goes
Explains static values, checked state, shared names, and change updates, but stops short of deeper browser internals.
Examples
Demonstrates four priority choices and a reusable Radio component for an add-task form.
What it assumes
Assumes basic JSX and form handling while teaching radio-button state control through a concrete example.
What you can do after
Build it from scratch as a controlled React priority selector that stores the selected value in state.
How it connects
Connects radio buttons with controlled components, React state, HTML forms, checkboxes, and select boxes.

Also explained in

Compare how 4 books explain radio button →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of React Quickly, Second Edition. The section links point to the parts of the book it draws on.