React Interview Prep
Practice the most common React interview questions — hooks, reconciliation, performance, and component design. Get evaluated like a senior engineer would evaluate you, with rubric-based feedback on depth, clarity, and correctness.
Explain the difference between useMemo and useCallback.
Hint: Cover memoized value vs memoized function, referential equality, and when each is worth using.
How would you build a custom hook for debounced search?
Hint: Show useEffect cleanup, useRef for timers, and dependency management.
When does useEffect run, and how do you control it?
Hint: Cover mounting, update, cleanup, empty dependency array, and the exhaustive-deps rule.
What is the purpose of useRef and when do you use it?
Hint: Cover DOM refs, mutable values that don't trigger re-renders, and interval/timeout patterns.
Explain reconciliation and how React decides what to re-render.
Hint: Cover the diffing algorithm, key prop, Fiber architecture, and batched updates.
Design a reusable form validation custom hook.
Hint: Show composability, error state management, touched tracking, and reusability across forms.
How would you prevent unnecessary re-renders in a large list?
Hint: Cover React.memo, key stability, context splitting, and virtualization.
When would you use Context vs an external state library?
Hint: Compare Context (simple global state) vs Zustand/Redux (complex, high-frequency updates).
How do you optimize a React app that renders thousands of list items?
Hint: Cover virtualization (react-window), lazy loading, and avoiding unnecessary state.
What is code splitting and how do you implement it in React?
Hint: Cover React.lazy, Suspense, dynamic import(), and route-based splitting.
How would you profile and fix a slow React component?
Hint: Cover React DevTools Profiler, avoiding anonymous functions in JSX, and memoization strategies.
Explain how React batches state updates.
Hint: Cover React 18 automatic batching, flushSync, and implications for async event handlers.
Docs explain what hooks do. Interviews test whether you understand the tradeoffs, edge cases, and when not to use them. Our AI asks follow-up questions just like a real panel.
Every answer is evaluated on depth, clarity, correctness, and example quality — not just whether you mentioned the right keywords. See exactly where your answers fall short.
Theory prep alone isn't enough. Practice building React components from scratch in a live IDE — hooks, state management, performance optimizations, and all.
Frontend interviews cover: React hooks (useState, useEffect, useCallback, useMemo, useRef, custom hooks), reconciliation and the virtual DOM, component design patterns, performance optimization (React.memo, lazy loading, code splitting), state management (Context API, Redux, Zustand), and error boundaries. For senior roles, interviewers also test React architecture decisions and tradeoff reasoning.
useMemo memoizes the result of an expensive computation and returns the cached value on subsequent renders when dependencies haven't changed. useCallback memoizes a function reference so it stays stable across renders. Use useMemo for expensive calculations; use useCallback when passing callbacks to child components that rely on referential equality to skip re-renders.
React reconciliation is the process by which React updates the DOM. When state or props change, React creates a new virtual DOM tree and compares it to the previous tree using a diffing algorithm. React assumes elements of different types produce different trees, and uses the 'key' prop to identify list items. React Fiber (introduced in React 16) broke this work into units that can be paused and prioritized.
Prepare by: (1) Understanding how each hook works internally, not just how to use it; (2) Building custom hooks for real use cases (debounce, fetch, local storage); (3) Practicing machine coding — build components like autocomplete, infinite scroll, and drag-and-drop; (4) Understanding React performance patterns — when and why to use React.memo, useMemo, and lazy; (5) Getting AI feedback on your answers to identify weak spots.
Answer real React interview questions, get rubric-based feedback, and see your coaching report in minutes. Free to start.