Course contentsShow
← React
Lesson 523 of 2,39614. Uncontrolled ComponentsFree lesson

When Submit-Time Reading is Appropriate

Understand scenarios where reading values only on submit is more efficient than controlled components.

When Submit-Time Reading is Appropriate

What you'll learn: When reading input values only at submit time makes more sense than tracking them in state on every keystroke.

The Core Idea

Not every form needs to react to every keystroke. Sometimes you just need the final values when the user clicks "Submit" — like a login form, a search box, or a contact form. In these cases, uncontrolled components with submit-time reading are more appropriate than controlled components that update state on every change.

When to Choose Submit-Time Reading

1. No Live Validation or Formatting
If you don't need to validate, format, or react to input as the user types, there's no benefit to the controlled pattern. Why trigger 50 re-renders for a 50-character comment?

2. Simple Submit-Only Forms
Login forms, search forms, and feedback forms often just need the final values. The journey doesn't matter — only the destination.

3. Large Forms
A 20-field registration form where each field triggers re-renders can feel sluggish. Reading everything once on submit keeps it snappy.

4. Performance-Sensitive Scenarios
When you've measured that controlled inputs are causing performance issues (laggy typing, slow parent re-renders), submit-time reading eliminates the problem entirely.

The Analogy

Think of a survey. You could watch the person fill it out and record each pencil stroke (controlled), or you could simply collect the completed form at the end (submit-time). If you don't need to guide them while they write, the second approach is far more efficient.

When It's Not Appropriate

If you need real-time feedback (character counters, password strength meters, conditional fields based on input), you must use controlled components. Submit-time reading can't power features that depend on current values.

Key Takeaway: Use submit-time reading with uncontrolled inputs when you only care about final values and don't need to react to changes as they happen — it's simpler and more performant.