Skip to main content
React Interview Questions Theory P0 Medium

Controlled vs uncontrolled inputs

Who owns the current input value in each pattern? Which would you choose for live validation?

Official Reference

Model Answer & Explanation

A controlled input reads its value from React and updates it synchronously in an onChange handler. An uncontrolled input keeps its current value in the DOM and can be initialized with defaultValue or defaultChecked. Controlled input state is convenient for live validation or value-dependent rendering.

Follow-up Interview Question · Why should a text input not switch from undefined value to a string mid-lifecycle?

Module Context & References

React · Rendering & hooks theory Explain renders, reconciliation, keys, state, effects and performance
Personal Notes · Markdown

Technologies & Interview Topics Covered

Switch between short-term interview tracks and long-term 80/20 engineering depth to practice JavaScript internals, React rendering and hooks, timed frontend machine coding UI challenges, MeetaPro FG300, Blind 75 & NeetCode 150 DSA patterns, Python & FastAPI APIs, PostgreSQL query optimization & MVCC, Redis caching, Applied AI RAG pipelines & evaluations, and distributed system design.