Beginner React Interview QuestionsBeginnerComparison
React · Question 21
What is the difference between controlled and uncontrolled components in React?
Direct answer
A controlled value is driven by React props or state, while an uncontrolled value keeps important state internally, often in the DOM for native form inputs.
| Feature | Controlled | Uncontrolled |
|---|---|---|
| Current value | Supplied by React state/props | Managed internally or by the DOM |
| Typical text input | value + onChange | defaultValue or no value prop |
| Coordination | Easy for parent logic to control | Less configuration |
| Source of truth | React state/parent | Element or component's local state |
The terms also apply more broadly to component design: a component is more controlled when important behavior is driven by props from its parent.