Comparison
Controlled inputvsUncontrolled input
Controlled input
the field's value comes from state and every keystroke goes through your change handler before it appears.
A form element whose displayed value is driven entirely by application state, with the DOM holding no independent copy. It makes validation, formatting and cross-field logic straightforward because there is exactly one value. The price is a re-render per keystroke and the classic trap of setting `value` without an `onChange`, which produces a field that cannot be typed into.
Full entry →Uncontrolled input
you let the DOM keep the value and only read it out when the form was submitted.
A form element that owns its own value, with the application reading it via a ref or the form data on submit. It is faster — no re-render per keystroke — and closer to how the platform works, which is why large forms and form libraries lean on it. The cost is that anything needing the live value, like a character counter or dependent field, has to reach into the DOM to get it.
Full entry →