Forms & Data Handling Interview Questions (React)
10 Forms & Data Handling questions from the React track. Read each short answer here, then open a question for the full explanation, examples, common mistakes, and sources.
- Junior
How do Controlled Components and Uncontrolled Components differ, and when should you prefer each?
A Controlled component's value is managed by React state (useState), while an Uncontrolled component keeps its value in the DOM and is read through a Ref or FormData.
Read the full explanation - Mid-level
Why can React Hook Form (RHF) perform better than traditional Formik forms?
React Hook Form uses the Uncontrolled pattern and registers inputs with Refs, avoiding a full form render on every keystroke, unlike Formik's Controlled State approach.
Read the full explanation - Mid-level
How do you integrate Zod with React forms for End-to-End Type-Safety?
Define a Zod Schema, derive its TypeScript type with z.infer, and connect it to a React form with zodResolver for synchronous validation.
Read the full explanation - Mid-level
How do you handle multiple file uploads and upload progress indicators in React forms?
Use an input type="file" to read e.target.files, put the files in FormData, and send them with XMLHttpRequest or Axios to listen for onUploadProgress.
Read the full explanation - Mid-level
How do you manage Dynamic Field Arrays whose number of fields changes in a form?
Use React Hook Form's useFieldArray to add, remove, and move fields dynamically, giving each field a stable, unique Key.
Read the full explanation - Senior
What are Server Actions in React 19, and how do they simplify form submission without JavaScript?
They are asynchronous functions that run only on the server and can be passed directly to a <form> action; they work even if JavaScript is disabled in the client browser (Progressive Enhancement).
Read the full explanation - Mid-level
How do you automatically save form drafts (Auto-save) to prevent users from losing their input?
Observe form values with Debounce and save them automatically in localStorage or send them to the server in the background; remove the draft after the final submission succeeds.
Read the full explanation - Mid-level
What accessibility standards (Form Accessibility - a11y) should web forms follow?
Associate each input with an explicit <label> through htmlFor and id, set aria-invalid and aria-describedby for errors, and support keyboard navigation and automatic focus.
Read the full explanation - Junior
How do you prevent double clicks and repeated form submissions (Double Submissions)?
Disable the submit button as soon as a request starts using isSubmitting, and cancel or ignore further requests while the first one is running.
Read the full explanation - Mid-level
How do you build a Multi-step Wizard Form while preserving data when a user goes back?
Keep the data for all steps in centralized state in the parent component, render the component for the current step, and provide back and next buttons without losing previous input.
Read the full explanation