← Quiz: React Basics: all 10 questions
Quiz: React Basics · Question 8 of 10
What is a controlled input in React?
What is a controlled input in React?
- A.An input that cannot be typed in
- B.An input whose value comes from state and is updated through onChange
- C.An input with the disabled attribute
- D.An input validated only by the server
Answer & explanation
Correct answer: An input whose value comes from state and is updated through onChange
React state is the single source of truth for the input's value.
Can you get the rest right without peeking?
Take the timed Quiz: React Basics quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →