When Uncontrolled is the Better Choice
What you'll learn: You'll understand when to skip controlled components and use uncontrolled inputs or form libraries instead.
The Performance Decision Point
You've learned that controlled components re-render on every keystroke and how to mitigate that cost through lifting state down and debouncing. But sometimes, the best mitigation strategy is not making the input controlled at all.
When to choose uncontrolled inputs:
1. Simple Form Submission
If you only need input values when the user clicks "Submit" — not during typing — controlled components are overkill. You're paying the re-render cost for zero benefit. Just read values from the DOM on submit using event.target.elements or refs.
2. Large Forms with Many Fields
A form with 20+ fields where each keystroke triggers validation or parent re-renders can become sluggish. If you don't need real-time validation or field interdependence, uncontrolled inputs with a form library (like react-hook-form) avoid the re-render storm entirely.
3. Text Editors or High-Frequency Input
Rich text editors, code editors, or canvas-based inputs often manage their own internal state. Fighting to make them controlled introduces unnecessary complexity and performance penalties.
4. Legacy Integration
When wrapping non-React components or third-party widgets, trying to force controlled behavior may be more trouble than it's worth.
The Principle
If you don't need state during typing — only at submission or on blur — uncontrolled inputs let React "get out of the way" and let the browser handle what it does best: text input.
Key Takeaway: Choose uncontrolled inputs or form libraries when you only need values at submission time, when managing many fields, or when real-time state updates create performance problems without delivering real-time benefits.