React Interview Questions 2026
React interview questions covering hooks, state management, performance optimization, and modern patterns used in AI-powered frontend applications.
What is the difference between useEffect and useLayoutEffect?
useEffect runs asynchronously after the browser paints — used for data fetching, subscriptions, and side effects that don't need to block rendering. useLayoutEffect runs synchronously after DOM mutations but before browser paint — use only when you need to measure DOM elements or apply CSS changes that would cause visible flicker. In most cases, useEffect is correct. useLayoutEffect is for rare cases like tooltip positioning.
How does React reconciliation work?
Reconciliation is React's algorithm to determine what changed between renders and update only the necessary DOM nodes. React compares virtual DOM trees using the diffing algorithm: (1) Elements of different types → rebuild entire subtree, (2) Elements of same type → update attributes, (3) Lists → use key prop to identify which items moved/added/removed. Always provide stable, unique keys for list items — using index as key breaks reordering.
90+ questions locked
Unlock the full React pack
Detailed answers, real company context, and practice mode — all in one course.
Ready to nail your React interview?
10-question AI readiness check → personalised study plan.
Take Free Assessment →