React Developer Technical Questions Interview Questions
10 curated questions with evaluation guidance for hiring managers.
Explain the React component lifecycle in functional components using hooks. How does useEffect mimic lifecycle methods?
Should explain mount (empty deps), update (deps array), and unmount (cleanup function). Look for understanding of how dependency arrays control effect behavior and common pitfalls like missing deps.
How does React's reconciliation algorithm work? What role do keys play?
Should explain virtual DOM diffing, how React determines minimal DOM updates, and why stable, unique keys are critical for list rendering performance. Look for understanding of the diff algorithm.
What causes unnecessary re-renders in React and how would you prevent them?
Should mention React.memo, useMemo, useCallback, state colocation, and context splitting. Look for understanding that these are optimizations to apply after identifying problems, not prematurely.
Explain the useRef hook. When would you use it instead of useState?
Should explain that useRef persists across renders without causing re-renders. Should mention DOM references, storing previous values, timers, and mutable values that shouldn't trigger renders.
How would you handle complex form state and validation in a React application?
Should discuss controlled components, form libraries (React Hook Form, Formik), validation schemas (Zod, Yup), and when to use each. Look for understanding of performance with many fields.
Describe how you would implement a custom hook. Give an example and explain when custom hooks are useful.
Should show understanding of extracting reusable stateful logic, naming conventions (use prefix), and composing hooks. Look for practical examples like useDebounce, useLocalStorage, or useFetch.
How do you manage global state in a React application? Compare Context API vs. state management libraries.
Should discuss when Context is sufficient (low-frequency updates, small state) vs. when Zustand/Redux is better (high-frequency updates, middleware, devtools). Look for pragmatic tool selection.
Explain React's error boundaries. What errors do they catch and what is their purpose?
Should explain they catch rendering errors in child components, provide fallback UI, and prevent app crashes. Should know they don't catch event handler, async, or SSR errors.
How do you test React components? What testing libraries and strategies do you use?
Should mention React Testing Library, testing user behavior over implementation details, mocking, and coverage philosophy. Look for pragmatic approach to what to test and what not to test.
What new React features or patterns are you excited about? How do you stay current with React ecosystem?
Should mention React Server Components, Suspense, concurrent features, or React Compiler. Look for genuine engagement with the ecosystem rather than just reciting release notes.
Want AI-generated interview questions tailored to your specific job description? Workro analyses your JD and generates behavioural and technical questions calibrated for the role, seniority level, and required skills — in seconds.
Try free