Technical Mid Level

What is your preferred approach to handling forms and validation in React? Compare controlled versus uncontrolled components.

Quick Tip

Show practical awareness: "I use React Hook Form for most forms because it uses uncontrolled inputs for performance and integrates well with Zod for schema validation."

What good answers include

Controlled components sync form state with React state on every change; uncontrolled components use refs to read values on submit. Libraries: React Hook Form (uncontrolled, performant), Formik (controlled, full-featured), or native HTML validation. Strong candidates discuss trade-offs: controlled gives full control but can cause excessive re-renders; uncontrolled is more performant but harder to validate in real-time.

What interviewers are looking for

Common React challenge. Candidates who write all form logic from scratch may not know the ecosystem. Those who blindly use a library without understanding controlled vs uncontrolled lack fundamentals.

← All React questions