These are the questions that actually decide React Developer interviews in India — practice answering out loud before your next round.
Q1.How does the React 19 Compiler eliminate the need for manual useMemo and useCallback hooks, and how does it optimize component graphs?
The React 19 Compiler (formerly React Forget) operates as an optimizing Babel/ESBuild plugin that analyzes JavaScript semantics and dependency graphs at build time. Traditional React relies on manual useMemo and useCallback, which are prone to stale dependency bugs and developer oversight. The React 19 compiler automatically inserts fine-grained memoization boundaries at the level of individual JSX elements, values, and closures. If a component re-renders because prop A changed, the compiler ensures that calculations or sub-trees dependent solely on prop B are skipped automatically without developer intervention, achieving fine-grained reactivity while maintaining standard idiomatic JavaScript syntax.
Q2.Explain the execution and data boundary differences between React Server Components (RSC) and Client Components ('use client').
React Server Components (RSC) execute exclusively on the server and never ship their JavaScript dependencies to the client bundle. They can directly query databases, read the filesystem, access internal microservices, and keep private API keys secure. They stream serialized virtual DOM nodes (the RSC payload) to the browser. Client Components (declared with 'use client') are rendered on the server during SSR for the initial HTML shell, and their JS bundles are downloaded to hydrate event listeners, state hooks (useState, useReducer), and browser APIs (window, localStorage). Client components can receive RSCs as children props, preserving zero-bundle-size server rendering inside interactive shells.
Q3.How does the React Fiber reconciliation algorithm work, and what role do the render phase and commit phase play?
React Fiber is a complete rewrite of the reconciliation engine from a recursive call-stack model to an asynchronous linked-list data structure where each Fiber node represents a unit of work with child, sibling, and return pointers. Reconciliation is split into two phases: (1) Render Phase: asynchronous, non-blocking and interruptible by the browser scheduler (cooperative multitasking). React diffs the previous and current Fiber trees, computes changes, and tags nodes with effect flags (Placement, Update, Deletion). If higher priority user input (e.g. typing) occurs, the render phase pauses and yields to the main thread. (2) Commit Phase: synchronous and uninterrupted. React applies the accumulated mutation effects directly to the host DOM and invokes useLayoutEffect / useEffect lifecycles.
Q4.What causes hydration mismatches in server-side rendered (SSR) React apps, and how do you debug and resolve them?
A hydration mismatch occurs when the server-generated pre-rendered HTML DOM tree differs from the initial virtual DOM tree computed by React during the client's first render pass. Common culprits include: rendering dynamic dates/timestamps (new Date()), accessing browser-only APIs (window.innerWidth, localStorage, navigator) during initial render, or invalid HTML nesting (e.g. <div> inside a <p> or <tr> outside a <tbody>). Debug by identifying the React error diff ('Text content did not match' or 'Prop did not match'). Fix by deferring client-specific rendering to a useEffect (mounted state pattern) or applying suppressHydrationWarning only on leaf text nodes where timing discrepancies are acceptable.
Q5.How does useTransition differ from standard setState, and how does it enable non-blocking concurrent rendering?
Standard setState updates are treated as urgent: they execute synchronously on the main thread, blocking user input until the entire component tree finishes rendering, which causes input lag or dropped frames on heavy data grids. Wrapping a state setter in startTransition(() => setQuery(val)) marks that state update as a non-urgent transition. React allows urgent events (such as keypresses, clicks, and animations) to interrupt the transition's background render. If the user types a new character before the background transition completes, React abandons the stale render pass and starts fresh with the latest state. The companion isPending boolean lets the UI display immediate non-blocking progress indicators.
Q6.Compare Zustand vs Redux Toolkit vs React Context: when does Context create performance bottlenecks?
React Context is a dependency injection mechanism, not a state manager. Whenever any value within a Context Provider changes, every consumer component that calls useContext(MyContext) is forced to re-render, even if the component only consumes a slice of the value that didn't change (violating selector-based subscription). For high-frequency updates (e.g. stock tickers, animations, real-time cursor positions), Context causes massive re-render cascades. Redux Toolkit provides strict immutable architecture and selector memoization (createSlice, reselect), but involves boilerplate. Zustand provides an unopinionated, lightweight (1KB) store built on useSyncExternalStore with selector-based subscriptions (useStore(state => state.user)), triggering re-renders strictly when the selected primitive changes.
Q7.How do you optimize Interaction to Next Paint (INP) and Cumulative Layout Shift (CLS) in complex single-page applications?
INP measures UI responsiveness to user clicks, taps, and keypresses. Optimize INP by: (1) Breaking up long tasks (> 50ms) using yieldToMain() via scheduler.yield() or setTimeout. (2) Deferring heavy state updates with useTransition or useDeferredValue. (3) Offloading heavy data parsing or crypto to Web Workers. (4) Avoiding synchronous layout thrashing (interleaving DOM reads like offsetHeight with DOM writes). CLS measures visual stability. Optimize CLS by: (1) Always setting explicit width and height or aspect-ratio on images and video embeds. (2) Reserving skeleton placeholders for dynamic ad containers or async data lists. (3) Using CSS font-display: optional or size-adjust to prevent FOIT/FOUT font reflows.
Q8.How do you implement windowing/virtualization for rendering lists with 50,000+ dynamic items without degrading DOM memory?
Rendering 50,000 raw DOM nodes causes catastrophic memory consumption and slow garbage collection. Windowing (using libraries like @tanstack/react-virtual or react-window) calculates the viewport height, scroll offset, and item heights, rendering strictly the slice of nodes currently visible on the screen plus an overscan buffer (e.g., 20–30 nodes). An outer container with overflow-y: auto maintains the full virtual scroll height, while an inner container uses CSS transform: translateY(offsetPx) to position the active elements. For dynamic or variable item heights, resize observers measure actual rendered heights on the fly and update the virtualization coordinate map dynamically.