⌘K
Flycodx

Controlled vs Uncontrolled Components

Controlled vs Uncontrolled Components

EasyFrontend0% accepted

Two engineers build the same form differently — one stores every field in state, the other reads values via refs on submit. Explain controlled vs uncontrolled components, the trade-offs, and when each is the right call.

Approach

Controlled: React state is the source of truth (value + onChange) — easy validation, more renders. Uncontrolled: the DOM holds state, read via ref — less code, harder live validation.

Scenarios & Expected Answers

No example scenarios for this problem.

Sign in to continue

Create a free account to view answers and mark progress.

  • Free forever — no credit card
  • Theory Q&A with detailed answers
  • Points, streaks & leaderboards
Auto Save On