Checkbox, Select and Textarea
Checkboxes use checked, selects and textareas use value. Handle each with onChange.
Example
<input type="checkbox" checked={on} onChange={(e) => setOn(e.target.checked)} />
<select value={color} onChange={(e) => setColor(e.target.value)}>
<option value="red">Red</option>
</select>Exercise
Checkbox property.
e.target.Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.