Q12: What is the difference between Controlled and Uncontrolled components?

Controlled components have form inputs whose value is driven entirely by React state via value and onChange. Uncontrolled components maintain input state within the real DOM itself, accessing values using refs.

Key Takeaways
  • Controlled components rely on React state as the single source of truth for input values.
  • Uncontrolled components store value state in the DOM and read values using refs.
Knowledge Check

Which element property dictates a input as a Controlled Component in React?