What is a controlled form field?
Answer out loud or in your head first, then compare.
Answer
It's a field whose current value comes from the app's state. The component gets value, and the user's change calls a handler that updates the state. That way I can check the data, show an error and control the field's value.
An example is a search box with value={query} and query updated in onChange. An uncontrolled field keeps its current value mainly in the DOM; the app can read it when needed. Form libraries often combine the two approaches to avoid unnecessary work. Make sure you don't accidentally switch a field between controlled and uncontrolled, e.g. by changing undefined to a string.
Why it matters: Forms are still important in a typical frontend task.
Possible follow-ups: Where should data be checked: only in the form, or on the server too?
How did it go? Be honest — “Not yet” puts the question on your review list.
Related questions
Further reading
- React: Describing the UI(opens in a new tab)Accessed 22.10.2026. Components, data and the identity of list items.