React · Middle · Question 74 of 75
What is the difference between a controlled and uncontrolled component in a design system?
- ✓Correct answer: Controlled components get their value from props (
value+onChange); uncontrolled ones keep internal state (defaultValue) - 2Controlled components use classes
- 3Uncontrolled components can't be styled
Explanation
Good component libraries support both: a value prop for full control and defaultValue for convenience, never switching between them during a component's life.