A controlled component is an input whose value is driven by React state. Every keystroke updates state, and state flows back to the input's value prop. React becomes the single source of truth for the field.
React Controls the Input Value
In a controlled input, you set value={state} and update state in onChange. The DOM display always reflects React state, making it easy to validate, transform, or reset fields programmatically.
Controlled components are the default recommendation for most React forms because they enable live validation, conditional disabling, and consistent testing.
Each keystroke re-renders the component owning state. For large forms, split into subcomponents, use uncontrolled inputs with a form library, or register fields with React Hook Form to limit re-renders.
Common Mistakes
Setting value={undefined} which makes input uncontrolled/unpredictable.
Using value on checkbox instead of checked.
Mutating state object instead of spreading into new object.
Mixing defaultValue and value on same input.
Key Takeaways
Controlled inputs bind value/checked to React state.
React state is the single source of truth.
Ideal for validation, formatting, and conditional UI.
Use object state or form libraries for multi-field forms.
Pro Tip
If you see "A component is changing an uncontrolled input to be controlled" warning, initialize state to '' not undefined.
You can build controlled inputs confidently. Next, compare uncontrolled components and when to use refs.