AceDevHub
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.

FeatureControlledUncontrolled
Current valueSupplied by React state/propsManaged internally or by the DOM
Typical text inputvalue + onChangedefaultValue or no value prop
CoordinationEasy for parent logic to controlLess configuration
Source of truthReact state/parentElement 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.