React Interview Questions and Answers (2026)
Master your React developer interview with these 50 essential questions. Includes detailed answers on Hooks, Virtual DOM, Concurrent Mode, React 19 Server Components, common pitfalls, and senior/lead architectural concepts.
The React Interview Landscape in 2026: Why React Mastery is Crucial
React continues to be the dominant frontend library globally. For engineering roles at Google, Meta, Netflix, Uber, Airbnb, and other top-tier product tech companies, your React capability is a direct indicator of your ability to build modular, high-performance, and scalable user interfaces.
React interviews do not just verify if you can write a useState hook. Interviewers evaluate your understanding of:
- Rendering Mechanics: How the reconciliation engine (Fiber) processes updates and maps changes to the real DOM.
- State Management & Data Flow: How data propagates through components, and when to use local state, context, or external stores (Zustand/Redux).
- Modern Architecture: Your comfort with modern standards like React Server Components (RSC), Suspense boundaries, and Concurrent rendering.
- Performance Optimization: How you identify bottlenecks, measure re-renders, and use memoization selectively.
This guide compiles the top 50 React interview questions, structured by category, to help you prepare thoroughly.
---
Section 1: Fundamentals (Components, JSX, Props, State)
Q1: What is the difference between Element and Component in React?
- Difficulty: Easy
- Why Interviewers Ask It: Verifies basic structural knowledge.
- Detailed Answer:
- A React Element is a plain JavaScript object describing what should appear on the screen (type, props). Elements are immutable.
- A React Component is a template, function, or class that accepts inputs (props) and returns a React element tree.
- Common Mistakes: Conflating the two or believing elements are actual DOM elements.
- Sample Interview Answer:
const element = <h1>Hello</h1>; // React Element (plain object)
function Welcome() { return <h1>Hello</h1>; } // React Component
Q2: What is the purpose of JSX? Does the browser understand it?
- Difficulty: Easy
- Why Interviewers Ask It: Checks compilation pipeline understanding.
- Detailed Answer: JSX (JavaScript XML) is a syntax extension that allows writing HTML-like code inside JavaScript. Browsers do not understand JSX. It must be compiled to standard JavaScript (e.g., via Babel using
React.createElement()or the new JSX transform_jsx()) before execution. - Common Mistakes: Thinking JSX is a runtime feature of the browser.
- Sample Interview Answer:
"JSX is syntactic sugar that makes writing component structures intuitive. During the build step, compiler tools transform JSX elements into nested React.createElement() function calls which the JS runtime executes."
Q3: What is the difference between Props and State?
- Difficulty: Easy
- Why Interviewers Ask It: Basic data flow comprehension check.
- Detailed Answer:
- Props (properties) are read-only configuration inputs passed from parent to child. They are immutable from the child's perspective.
- State is a private, mutable data structure managed entirely within the component itself. Changes to state trigger component re-rendering.
- Common Mistakes: Mutating props directly inside a child component.
- Sample Interview Answer:
"Props are like function parameters passed down to configure a component, whereas state is like variables declared inside a function to manage its own internal state."
Q4: Why is state mutation a bad practice in React?
- Difficulty: Medium
- Why Interviewers Ask It: Checks understanding of immutability and component re-rendering triggers.
- Detailed Answer: React relies on referential equality checks (shallow comparison) to detect state changes. If you mutate state directly (e.g.,
state.value = 5), the reference remains unchanged, and React will not trigger a re-render. Always use updater functions with copied values (immutable state). - Common Mistakes: Mutating array states directly with methods like
.push()or.sort(). - Sample Interview Answer:
// Bad: obj.value = 5; setObj(obj); (no re-render)
// Good:
setObj(prev => ({ ...prev, value: 5 }));
Q5: What is the purpose of the `key` prop in React lists?
- Difficulty: Easy
- Why Interviewers Ask It: Performance and DOM stability check during reconciliation.
- Detailed Answer: The
keyprop provides a stable identity to elements in a list, helping React identify which items have changed, been added, or been removed. It optimizes the reconciliation process to prevent destroying and recreation of DOM nodes. - Common Mistakes: Using array indexes as keys when the list can be reordered, filtered, or prepended (causes rendering bugs and performance issues).
- Sample Interview Answer:
"Keys tell React which list items are stable. Using unique IDs as keys prevents state mapping bugs when elements are dynamically reordered or deleted."
Q6: Explain Controlled vs Uncontrolled Components.
- Difficulty: Easy
- Why Interviewers Ask It: Form handling mechanics validation.
- Detailed Answer:
- Controlled Component: State manages the form value, and updates flow via event handlers (
value+onChange). React is the single source of truth. - Uncontrolled Component: The DOM manages form values directly. Access them using refs (
useRef). - Common Mistakes: Mixing controlled and uncontrolled properties, causing warning notifications in the console.
- Sample Interview Answer:
// Controlled: <input value={value} onChange={e => setValue(e.target.value)} />
// Uncontrolled: <input ref={inputRef} />
Q7: What is Prop Drilling and how can you avoid it?
- Difficulty: Easy
- Why Interviewers Ask It: State sharing architecture checks.
- Detailed Answer: Prop drilling is passing props through multiple nested components that do not need the data, solely to reach a deeply nested child. Avoid it using Context API, Component Composition, or global state stores (Zustand, Redux).
- Common Mistakes: Overusing Context for *every* prop, leading to global re-render performance bottlenecks.
- Sample Interview Answer:
"Prop drilling degrades code maintainability. We can bypass intermediate elements by using component composition or by establishing global context scopes for shared state."
---
Section 2: Hooks (useState, useEffect, useMemo, useCallback, useRef)
Q8: What are the Rules of Hooks in React?
- Difficulty: Easy
- Why Interviewers Ask It: Basic syntax and execution context check.
- Detailed Answer:
- Only call hooks at the top level of your functional components (never inside loops, conditions, or nested functions).
- Only call hooks from React function components or custom hooks.
- Common Mistakes: Conditionally invoking hooks, which breaks React's internal call-order tracking index array.
- Sample Interview Answer:
"Hooks must execute in the exact same order on every render. Calling them conditionally breaks React's tracking index array, causing unexpected state mismatches."
Q9: How does the cleanup function in `useEffect` work? When does it run?
- Difficulty: Medium
- Why Interviewers Ask It: Memory leak and subscription lifecycle validation.
- Detailed Answer: The cleanup function is returned by a
useEffect. It runs:
- Before the effect runs again (when dependency variables update).
- When the component unmounts.
It is used to cancel subscriptions, abort fetch requests, or clear intervals.
- Common Mistakes: Forgetting to clean up active listeners, leading to cumulative memory leaks.
- Sample Interview Answer:
useEffect(() => {
const handleResize = () => console.log(window.innerWidth);
window.addEventListener('resize', handleResize);
return () => window.removeEventListener('resize', handleResize); // clean up
}, []);
Q10: What is the difference between `useMemo` and `useCallback`?
- Difficulty: Medium
- Why Interviewers Ask It: Performance profiling validation.
- Detailed Answer:
useMemoreturns a memoized value (results of a calculation).useCallbackreturns a memoized function definition itself.- Common Mistakes: Wrapping simple inline callbacks inside
useCallbackwhen there is no child component usingReact.memo(adds overhead without benefit). - Sample Interview Answer:
"UseuseMemoto cache expensive calculations. UseuseCallbackto cache callback functions passed to memoized children to prevent broken referential equality checks."
Q11: Explain the purpose of `useRef`. How does it differ from `useState`?
- Difficulty: Medium
- Why Interviewers Ask It: State retention without rendering check.
- Detailed Answer:
useRefreturns a mutable object with a.currentproperty that persists across renders. Changing.currentdoes not trigger a re-render.useStatepreserves state values but does trigger a re-render on mutation setter invocation.- Common Mistakes: Modifying
.currentexpecting the UI to redraw immediately. - Sample Interview Answer:
// Storing reference to DOM node or timer ID
const timerIdRef = useRef(null);
const startTimer = () => { timerIdRef.current = setInterval(() => {}, 1000); };
const stopTimer = () => { clearInterval(timerIdRef.current); };
Q12: How does `useContext` work? How do you prevent unnecessary renders when using it?
- Difficulty: Hard
- Why Interviewers Ask It: Advanced data optimization checks.
- Detailed Answer:
useContextconsumes values from a Context Provider. When the provider value changes, all subscribing components re-render. Prevent unnecessary renders by:
- Splitting context into state and dispatch context objects.
- Memoizing the provider value object.
- Splitting components into smaller memoized child wrappers.
- Common Mistakes: Putting all global states into a single large Context object.
- Sample Interview Answer:
"To optimize context, split state and dispatchers into separate providers. This ensures components that only trigger actions don't re-render when state variables update."
Q13: What is lazy state initialization in `useState`?
- Difficulty: Easy
- Why Interviewers Ask It: Basic optimization validation.
- Detailed Answer: If your initial state is calculated via an expensive function, pass a function callback instead of the computed value directly:
useState(() => expensiveFunc()). This ensures the function only runs once on mount, rather than on every render. - Common Mistakes: Calling the function directly inside the hook:
useState(expensiveFunc()). - Sample Interview Answer:
// Runs only once on mount
const [state, setState] = useState(() => {
const saved = localStorage.getItem('key');
return saved ? JSON.parse(saved) : defaultValue;
});
---
Section 3: Rendering & Reconciliation (Virtual DOM, Lifecycle)
Q14: Explain the Reconciliation process and the Diffing Algorithm.
- Difficulty: Hard
- Why Interviewers Ask It: Core mechanics verification.
- Detailed Answer: Reconciliation is the algorithm React uses to update the DOM. When state changes, a new Virtual DOM tree is created. React diffs the new tree with the old tree:
- If element types differ, React tears down the old tree and builds a new one from scratch.
- If element types are the same, React compares attributes, updates only modified values, and recurses on children.
- It uses
keyprops to match children across updates. - Common Mistakes: Thinking React scans the real DOM to compare changes (it only compares memory-bound Virtual DOM node representations).
- Sample Interview Answer:
"Reconciliation determines the minimal set of DOM mutations. By comparing structural element types and key identities between virtual trees, React updates only the layout nodes that actually changed."
[State Update Triggered]
|
v
[Generate New Virtual DOM]
|
(Diffing Algorithm: Compare types, props, and keys)
v
[Identify Delta Changes]
|
v
[Commit Phase: Batch Update Real DOM]
Q15: What is the React Fiber architecture?
- Difficulty: Hard
- Why Interviewers Ask It: Advanced framework structure knowledge.
- Detailed Answer: React Fiber is the core reconciliation engine introduced in React 16. It replaced the synchronous stack reconciler. Fiber breaks rendering work into incremental units of work (fibers) and allows React to pause, abort, or reuse rendering tasks dynamically. This enables concurrent rendering features.
- Common Mistakes: Thinking Fiber is a user-facing API (it is an internal execution engine).
- Sample Interview Answer:
"Fiber introduces an incremental work scheduler. By breaking synchronous rendering into prioritized segments, React can pause rendering for urgent user input, ensuring smooth 60fps frame rates."
Q16: What is the difference between the Render Phase and Commit Phase?
- Difficulty: Hard
- Why Interviewers Ask It: Crucial for understanding side effect placements.
- Detailed Answer:
- Render Phase: React traverses the component tree, computes updates, and checks virtual DOM differences. This phase is asynchronous and can be paused or restarted. No side effects should occur here.
- Commit Phase: React applies the calculated updates to the real DOM. This phase is synchronous and execution cannot be paused. Side effects (like
useEffectoruseLayoutEffect) run after this phase. - Common Mistakes: Putting side-effects or state updates directly inside the component body (render phase).
- Sample Interview Answer:
"The render phase calculates the changes in the Virtual DOM and is interruptible. The commit phase writes those changes directly to the real DOM synchronously, executing side effects afterwards."
---
Section 4: Performance Optimization (Memoization, Lazy Loading)
Q17: When does a React component re-render?
- Difficulty: Easy
- Why Interviewers Ask It: Basic mental rendering model validation.
- Detailed Answer: A component re-renders when:
- Its state updates.
- Its parent component re-renders.
- A consumed Context value changes.
- Common Mistakes: Thinking a child component only re-renders when its props change (by default, if the parent re-renders, the child re-renders regardless of props unless memoized).
- Sample Interview Answer:
"React triggers updates on state mutations, context updates, or parent re-renders. Use React.memo if you want to skip child rendering when its props remain unchanged."
Q18: How does `React.memo` work? When should you use it?
- Difficulty: Medium
- Why Interviewers Ask It: Optimizing component structures.
- Detailed Answer:
React.memois a higher-order component that wraps functional components. It performs a shallow comparison of props. If props haven't changed, React skips rendering the component and reuses the last rendered output. - Common Mistakes: Wrapping all components in
React.memo(shallow comparisons have overhead, which can be slower than rendering if props change frequently). - Sample Interview Answer:
// Use it on pure presentation components that render frequently with identical props.
const MyComponent = React.memo(function MyComponent({ value }) {
return <div>{value}</div>;
});
Q19: Explain Code Splitting and Dynamic Imports in React.
- Difficulty: Medium
- Why Interviewers Ask It: Bundle optimization and load performance checks.
- Detailed Answer: Code splitting breaks single large production JS bundles into smaller chunks loaded on-demand. Implement it using
React.lazy()andSuspense. - Common Mistakes: Loading dynamic imports synchronously or not wrapping lazy components in
<Suspense>. - Sample Interview Answer:
import React, { lazy, Suspense } from 'react';
const LargeChart = lazy(() => import('./LargeChart'));
function App() {
return (
<Suspense fallback={<div>Loading component...</div>}>
<LargeChart />
</Suspense>
);
}
Q20: What is DOM Virtualization (Windowing)?
- Difficulty: Hard
- Why Interviewers Ask It: Rendering performance on heavy pages (e.g. lists, feeds).
- Detailed Answer: Virtualization optimizes list rendering by only drawing nodes that are currently visible within the viewport. Invisible nodes are removed from the DOM, keeping the DOM tree size constant and saving layout execution time.
- Common Mistakes: Rendering thousands of complex list items concurrently, freezing the browser layout.
- Sample Interview Answer:
"Virtualization keeps page performance consistent by only rendering elements visible in the viewport. Libraries like react-window help manage this scroll viewport dynamically."
---
Section 5: State Management (Context, Redux, Zustand)
Q21: When should you use Context API vs Redux/Zustand?
- Difficulty: Medium
- Why Interviewers Ask It: Checks capability to design state architecture.
- Detailed Answer:
- Context API: Built-in tool suited for low-frequency global updates (theme, auth state, localization). It lacks optimization for frequent updates because any change re-renders all consumers.
- Redux/Zustand: External store libraries designed for complex state structures with high-frequency updates. They use selectors to ensure components only re-render when the selected slice changes.
- Common Mistakes: Replacing dedicated state management stores with Context for high-frequency dashboard analytics.
- Sample Interview Answer:
"Use Context for static, low-frequency state. Use Zustand or Redux for complex, high-frequency updates where selective rendering updates via selectors are required for performance."
Q22: What are selectors in state management? Why are they useful?
- Difficulty: Easy
- Why Interviewers Ask It: Selective rendering checks.
- Detailed Answer: A selector is a function that extracts a specific slice of state from the global store. It allows components to subscribe only to the data they need, preventing re-renders when other parts of the store update.
- Common Mistakes: Returning new object references inside selectors, which breaks shallow checks and causes unnecessary re-renders.
- Sample Interview Answer:
// Zustand Example
const userName = useStore(state => state.user.name); // only re-renders if name changes
---
Section 6: Advanced Topics (Concurrent, RSC, Suspense)
Q23: What is Concurrent Rendering in React?
- Difficulty: Hard
- Why Interviewers Ask It: Testing knowledge of advanced modern React rendering logic.
- Detailed Answer: Concurrent rendering is an internal capability enabling React to prepare multiple versions of the UI concurrently. It allows rendering to be paused, resumed, or discarded. This prevents rendering calculations from blocking user interactions.
- Common Mistakes: Confusing concurrent rendering with multi-threading (React is still single-threaded, concurrency is managed via cooperative scheduling).
- Sample Interview Answer:
"Concurrent rendering allows React to schedule render tasks by priority. If a heavy update is running and a user clicks an input, React pauses the background render, updates the input instantly, and resumes the update."
Q24: What are React Server Components (RSC)? How do they differ from SSR?
- Difficulty: Hard
- Why Interviewers Ask It: Tests React 19 architecture expertise.
- Detailed Answer:
- RSC: Components that render exclusively on the server. Their code stays on the server, significantly reducing client bundle size. They can fetch data and access backend infrastructure directly.
- SSR (Server-Side Rendering): A pre-rendering method where the entire component tree is converted to HTML on the server and hydrated on the client. SSR client components still ship JS to the browser.
- Common Mistakes: Attempting to use hooks (like
useState) inside a Server Component. - Sample Interview Answer:
"RSC is a component type that never ships JavaScript to the client. SSR is a technique to generate HTML on the server for hydration. RSC and SSR are complementary technologies."
Q25: How do Error Boundaries work in React? Can they catch errors in async code?
- Difficulty: Medium
- Why Interviewers Ask It: Resilience design validation.
- Detailed Answer: Error Boundaries are class components that catch JavaScript errors anywhere in their child component tree, logging them and displaying a fallback UI. They cannot catch errors in:
- Asynchronous code (e.g.,
setTimeout,fetchcallbacks). - Event handlers.
- Server-Side Rendering.
- Common Mistakes: Expecting an Error Boundary to catch failed API call fetch rejections automatically.
- Sample Interview Answer:
// Implement using getDerivedStateFromError and componentDidCatch.
class ErrorBoundary extends React.Component {
state = { hasError: false };
static getDerivedStateFromError() { return { hasError: true }; }
render() {
if (this.state.hasError) return <h1>Something went wrong.</h1>;
return this.props.children;
}
}
---
Section 7: React 19 Specific Questions
Q26: What is the new `use` hook in React 19?
- Difficulty: Medium
- Why Interviewers Ask It: Up-to-date syntax checks.
- Detailed Answer: The
usehook is a new API that allows reading resources (like Promises or Context) directly inside the render block. Unlike standard hooks,usecan be called conditionally or inside loops. - Common Mistakes: Calling traditional hooks (like
useEffect) conditionally (onlyuseis allowed conditionally). - Sample Interview Answer:
// Reading data from a promise conditionally
const data = use(fetchPromise);
Q27: How does the new `<form>` Action support work in React 19?
- Difficulty: Medium
- Why Interviewers Ask It: Modern data action handling verification.
- Detailed Answer: React 19 introduces native form Actions. You can pass a function directly to the
<form action={handleSubmit}>attribute. React automatically manages the pending state, error handling, and form resetting, and exposes hooks likeuseActionStateanduseFormStatus. - Common Mistakes: Manually managing loading state variables when using Action functions.
- Sample Interview Answer:
async function formAction(prevState, formData) {
const email = formData.get('email');
await subscribeUser(email);
}
const [state, action, isPending] = useActionState(formAction, null);
// <form action={action}>... <button disabled={isPending}>Submit</button>
Q28: Explain the `useFormStatus` hook in React 19.
- Difficulty: Easy
- Why Interviewers Ask It: Modern form component pattern verification.
- Detailed Answer:
useFormStatusallows nested child components inside a<form>to read the parent form's submission state (pending status, data submitted, method) without passing props. - Common Mistakes: Calling
useFormStatusin the component that renders the<form>itself (it must be called inside a child component *nested* within the form). - Sample Interview Answer:
"Call useFormStatus inside child inputs or submit buttons to determine if the parent form is pending, allowing them to disable themselves during processing."
---
Section 8: Component Design & Lifecycle
Q29: What is Component Composition? Why is it preferred over inheritance?
- Difficulty: Easy
- Why Interviewers Ask It: Basic design pattern understanding.
- Detailed Answer: Component composition is the practice of combining smaller, independent components to build complex UI structures using the
childrenprop. React design guidelines strongly favor composition over inheritance for reusability. - Common Mistakes: Attempting to build deep subclassing chains to share layout styling.
- Sample Interview Answer:
"Composition provides infinite flexibility. We pass layouts, sidebars, or headers as children props, avoiding strict subclass constraints."
Q30: What is the difference between `useEffect` and `useLayoutEffect`?
- Difficulty: Medium
- Why Interviewers Ask It: Layout rendering mechanics validation.
- Detailed Answer:
useEffectruns asynchronously after the commit phase and after the browser has painted the screen. It is non-blocking.useLayoutEffectruns synchronously after DOM mutations but *before* the browser paints the screen. Use it to measure DOM layouts and prevent visual flickering.- Common Mistakes: Using
useLayoutEffectfor standard data fetching (which blocks visual rendering). - Sample Interview Answer:
"UseuseEffectfor the majority of tasks. Switch touseLayoutEffectonly if you need to calculate layouts or adjust element styles before the screen draws to prevent visual jitter."
---
Section 9: Advanced Performance
Q31: How do you optimize rendering performance in huge React lists?
- Difficulty: Hard
- Why Interviewers Ask It: Scaling knowledge verification.
- Detailed Answer:
- Implement virtualization using windowing libraries (like
react-window). - Wrap items in
React.memoand verify referential equality of callbacks usinguseCallback. - Ensure keys are unique, stable IDs (never array indexes).
- Keep local item components stateful if actions are isolated.
- Common Mistakes: Attempting to render 5,000 table rows synchronously on a single state update.
- Sample Interview Answer:
"Combine list virtualization with memoization of child nodes. Ensure callback props remain reference-stable using useCallback to prevent broken optimization checks."
Q32: Explain the concept of Code Splitting and the benefit of prefetching.
- Difficulty: Medium
- Why Interviewers Ask It: Page optimization strategies check.
- Detailed Answer: Code splitting reduces initial script sizes. Prefetching loads split code chunks in the background during browser idle times (e.g., when hovering over a menu link) to make the route transitions instantaneous.
- Common Mistakes: Over-splitting components into tiny modules, which increases network handshake counts.
- Sample Interview Answer:
"Use dynamic imports for lazy loading heavy pages, and leverage resource hints like <link rel="prefetch"> to download code blocks before the user navigates to them."
---
Section 10: State Management Advanced (Redux vs Zustand)
Q33: How does Zustand compare to Redux?
- Difficulty: Easy
- Why Interviewers Ask It: State library evaluations check.
- Detailed Answer:
- Zustand: Minimal boilerplate, uses hooks naturally, no Context provider wrapping required, state updates are simple mutations.
- Redux: Opinionated setup, requires actions, reducers, and dispatchers, wraps app in a Provider, best for massive enterprise structures with strict action tracking needs.
- Common Mistakes: Building complex middleware loops in Zustand when simple state variables are sufficient.
- Sample Interview Answer:
"Zustand is lightweight and provides a clean hook-based model. Redux is highly structured and opinionated, making it suitable for massive apps with strict state logging requirements."
---
Section 11: Real-world Design Challenges
Q34: Design a custom Hook `useFetch` with caching, refetching, and abort capabilities.
- Difficulty: Hard
- Why Interviewers Ask It: Evaluates code modularity, closure caching, cleanup validation, and handling race conditions.
- Detailed Answer: The hook must store request states, execute fetch calls with AbortController, clean up on dependency changes, and store results in a shared cache map.
- Common Mistakes: Failing to abort fetch requests when component variables change, causing state resolution on unmounted nodes.
- Sample Interview Answer:
const cache = new Map();
function useFetch(url) {
const [state, setState] = useState({ data: null, loading: true, error: null });
useEffect(() => {
if (cache.has(url)) {
setState({ data: cache.get(url), loading: false, error: null });
return;
}
const controller = new AbortController();
setState(s => ({ ...s, loading: true }));
fetch(url, { signal: controller.signal })
.then(res => res.json())
.then(data => {
cache.set(url, data);
setState({ data, loading: false, error: null });
})
.catch(error => {
if (error.name !== 'AbortError') setState({ data: null, loading: false, error });
});
return () => controller.abort();
}, [url]);
return state;
}
Q35: Design an autocomplete search input box.
- Difficulty: Hard
- Why Interviewers Ask It: Focuses on layout optimization, search delays, and user event handling.
- Detailed Answer:
- Use Debouncing on inputs to prevent spamming APIs.
- Implement client caching (key/value search matches).
- Expose accessibility keys (up/down arrow keys and escape key).
- Clean up pending requests using an AbortController.
- Common Mistakes: Querying the database on every keystroke or ignoring keyboard navigation rules.
- Sample Interview Answer:
"An optimal autocomplete component requires a debounced listener, a local cache map for previously searched terms, and keyboard listener handlers for active navigation."
---
Top 20 Most Frequently Asked React Questions
- React 19 forms: How does
useActionStatesimplify loading state handling? - Virtual DOM definition: What is it and how does React use it to optimize updates?
- Strict Mode: Why does React double-render components in development? (To help discover side-effects in the render phase).
- Hooks array order: Why can't hooks be called inside loops?
- State batching: How does React batch state updates?
- ForwardRef: How does a parent component access a child's DOM node?
- Portals: How do you render components (like modals) outside the parent DOM hierarchy?
- HOC vs Render Props: How do you share behavior before hooks?
- React.Fragment: Why is wrapping nodes in fragments useful?
- State lifting: When do you lift state to parent scopes?
- Profiler API: How do you measure rendering durations?
- Next.js app directory: How does next route structures utilize RSC by default?
- Zustand selectors: Why are selectors essential to prevent re-renders?
- AbortController: How do you cancel pending effects?
- Hydration errors: What causes SSR hydration mismatches?
- Key index bug: What occurs if index is used as a list key during reorders?
- Refresher dependency: What happens if dependencies are omitted from
useEffect? - Custom hooks: How do they encapsulate states?
- Context performance: Why is context not suited for high-frequency updates?
- Error boundary limits: Why can't boundaries capture async code failures?
---
Senior React Interview Questions
- Explain the scheduling architecture in Concurrent Mode: How fiber node states prioritize user actions over asynchronous rendering.
- State management profiling: How do you resolve performance degradation caused by context re-renders in a deep tree structure?
- Micro-frontends layout: How to coordinate routing and state between multiple federated React applications safely.
- React Server Component hydration protocols: How RSC serialization payloads hydrate client components.
---
Google & Meta Style React Questions
- Virtual Windowing implementation: Code a custom scroll virtualization list container from scratch.
- Custom scheduler: Write a prioritizer helper that queues state updates based on browser framerates.
- Real-time sync: Design a collaborative form component that handles concurrent edits and prevents inputs overwriting each other.
---
Quick Revision Notes
- Virtual DOM: Memory representation of DOM structures diffed by reconciliation.
- Fiber Engine: Enables splitting render work into prioritized segments.
- State immutability: Needed for referential comparisons to work.
- RSC vs SSR: RSC never sends JS to browser; SSR pre-renders layouts.
- rAF throttling: Best for UI recalculation frames.
---
5 Interview Tips
- Draw reconciliation: Explain the virtual DOM vs real DOM update cycles.
- Discuss layout costs: Mention performance trade-offs of using
useLayoutEffectvsuseEffect. - Prioritize clean code: Keep variable naming readable and logical during live coding.
- Validate edge cases: Add checks for empty arrays, loading states, and network errors.
- Be collaborative: Pause and confirm approach steps with your interviewer.
---
Frequently Asked Questions (FAQs)
#### Q: Does React 19 replace state management libraries?
A: No. React 19 form actions simplify request pending states, but complex application state workflows still benefit from stores like Zustand.
#### Q: Why can't I call hooks conditionally?
A: React relies on the call order of hooks to match state blocks. Conditional calls scramble this sequence index.
#### Q: How do you identify performance issues in React?
A: Use the React DevTools Profiler to capture render counts and durations, noting which props triggered changes.
#### Q: What is code splitting?
A: Splitting single bundle JS files into on-demand dynamic import chunks, managed via Suspense wrappers.
---
Ready to Master Your React Technical Round?
Practicing questions is crucial, but simulating real interviews builds true confidence.
Get Real-Time Interview Practice with InterviewMantra
- Adaptive AI: Experience interactive questions tailored dynamically to your skill level.
- Technical depth: Solve system design and coding challenges in our integrated IDE.
- Detailed Analytics: Receive comprehensive score reports highlighting strength and improvement areas.
[👉 Start a Free AI Mock Interview Now](https://interviewmantra.in/register)
Frequently Asked Questions
Does React 19 replace state management libraries?
No. React 19 form actions simplify request pending states, but complex application state workflows still benefit from stores like Zustand.
Why can't I call hooks conditionally?
React relies on the call order of hooks to match state blocks. Conditional calls scramble this sequence index.
How do you identify performance issues in React?
Use the React DevTools Profiler to capture render counts and durations, noting which props triggered changes.
What is code splitting?
Splitting single bundle JS files into on-demand dynamic import chunks, managed via Suspense wrappers.