20 questions · Updated June 2026

Top React Interview Questions and Answers (2026)

React interviews moved past 'what is JSX?' years ago. These questions reflect what hiring managers in product startups actually ask in 2026.

Book a free demo
  1. Q01.What is the virtual DOM?

    An in-memory representation of the UI tree. React diffs the previous and next trees and applies the minimum DOM changes — fast and predictable.

  2. Q02.Props vs state?

    Props are passed in from a parent and are read-only. State is local, mutable via setters, and triggers re-renders when changed.

  3. Q03.What is JSX?

    A syntax extension that lets you write HTML-like markup inside JavaScript. It compiles to `React.createElement` calls.

  4. Q04.What are React keys and why do they matter?

    Keys help React identify which items in a list changed. Without stable keys, React may re-render or re-mount elements unnecessarily, losing local state.

  5. Q05.useState vs useReducer?

    useState for simple values. useReducer when state transitions are complex or depend on the previous state in non-trivial ways.

  6. Q06.When does useEffect run?

    After the component renders and the DOM is updated. The cleanup function runs before the next effect or on unmount.

  7. Q07.What is the dependency array in useEffect?

    It controls when the effect re-runs. Empty array = once after mount. With deps = whenever a dep changes. Missing array = after every render.

  8. Q08.Difference between controlled and uncontrolled components?

    Controlled inputs derive their value from React state. Uncontrolled inputs let the DOM hold the value and you read it via refs.

  9. Q09.What is context?

    A way to pass values through the tree without prop drilling. Best for low-frequency, app-wide values like theme or user — not for high-frequency state.

  10. Q10.What is React.memo?

    A higher-order component that skips re-renders when props are shallowly equal — useful for expensive children that often receive the same props.

  11. Q11.useMemo vs useCallback?

    useMemo memoises a computed value; useCallback memoises a function reference. Both stabilise references for memoised children or effect deps.

  12. Q12.What are custom hooks?

    Functions starting with `use` that compose other hooks to encapsulate reusable stateful logic.

  13. Q13.What is the children prop?

    A special prop that holds whatever JSX is nested inside a component, enabling composition.

  14. Q14.How do you handle forms in React?

    Either controlled (value bound to state) or via libraries like React Hook Form for performance and validation.

  15. Q15.What is lazy loading in React?

    Splitting code so components load only when needed via `React.lazy` and `Suspense`, reducing initial bundle size.

  16. Q16.What are error boundaries?

    Class components implementing `componentDidCatch` that catch render-time errors in their subtree and show a fallback UI.

  17. Q17.How does React's reconciliation work?

    It diffs the new virtual DOM against the previous one based on element type and keys, then applies minimal DOM mutations.

  18. Q18.What is Suspense?

    A component that lets you declaratively show a fallback UI while child components are loading code or data.

  19. Q19.What is hydration?

    Attaching React event handlers to server-rendered HTML so the page becomes interactive without re-rendering it on the client.

  20. Q20.How do you handle data fetching in modern React?

    Use TanStack Query, SWR or your framework's data layer (TanStack Start loaders, Remix loaders, Next server components) — they handle caching, deduplication and stale state.

Interview prep support

Get 1:1 prep on React

Our mentors will reach out with a personalised prep plan, mock interview slots and target-company question banks.