Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumReactcontrolled vs uncontrolledSingle-choice MCQ

A controlled multi-select is written as below and React logs a warning, plus selecting multiple options does not work as expected. What is the fix?

const [picked, setPicked] = useState('a'); <select multiple value={picked} onChange={(e) => setPicked(e.target.value)} > <option value="a">A</option> <option value="b">B</option> <option value="c">C</option> </select>