React Interview Prep

200+ React Interview Questions

Comprehensive React interview prep covering components, hooks, state management, lifecycle methods, context, and more. Questions asked at Razorpay, Flipkart, Google, Atlassian, Swiggy, CRED and other top tech companies.

🚀 Practice Now — It's Free💻 Output Quiz🐛 Debug Lab
Loading questions…

Core Javascript Topics

Rendering & PerformanceReact useEffect HookReact useContext HookConcurrent Rendering (React 18)React useState HookReact Fiber ArchitectureBrowse All Topics →

Frequently Asked Interview Questions

What is React?

React is a JavaScript library for building user interfaces using a component-based architecture. It allows developers to create reusable UI components and efficiently update the DOM using a Virtual DOM.

What is the Virtual DOM?

The Virtual DOM is a lightweight JavaScript representation of the real DOM. React uses it to compare previous and current UI states and update only the changed parts in the real DOM for better performance.

What triggers a re-render in React?

A re-render is triggered when state changes, props change, or context updates. A parent re-render can also cause child components to re-render unless optimizations like React.memo are used.

What is reconciliation in React?

Reconciliation is the process of comparing the old Virtual DOM with the new one to determine what has changed. React uses an optimized diffing algorithm to update only the necessary parts of the DOM.

What is the difference between useEffect and useLayoutEffect?

useEffect runs asynchronously after the browser paints, making it suitable for side effects like API calls. useLayoutEffect runs synchronously after DOM updates but before paint, useful for measuring layout or synchronizing UI changes.

What are controlled and uncontrolled components?

Controlled components manage form input values through React state, while uncontrolled components store their own state in the DOM and are accessed using refs. Controlled components provide better control and validation.

What is React.memo?

React.memo is a higher-order component that prevents unnecessary re-renders by memoizing a component. It performs a shallow comparison of props and skips rendering if props have not changed.

What are keys in React and why are they important?

Keys are unique identifiers used in lists to help React track elements during reconciliation. Stable keys allow React to update only changed items, improving performance and preventing UI bugs.

What is batching in React?

Batching is the process of grouping multiple state updates into a single render for performance optimization. React automatically batches updates in event handlers and async operations in modern versions.

What is React Fiber?

React Fiber is the internal reconciliation engine introduced in React 16. It enables interruptible rendering, prioritization of updates, and smoother UI by breaking work into smaller units.

How to Prepare for React Interviews

🧠

Understand, don't memorize

Focus on why React behaves the way it does — rendering patterns, state management, hooks behavior. Interviewers can tell the difference.

💻

Predict output before running

Use output quiz questions to train your mental model. If you can predict what code logs, you truly understand the concept.

🐛

Debug real bugs

Practice with buggy code that produces wrong output silently — not syntax errors. Real interview bugs are always logical, not typos.

📐

Master the core concepts

Async & Effects, Component Logic, Event Loop & Batching, async/await and features cover 90% of React interviews.

⏱️

Practice under time pressure

Use the Sprint feature — 10 questions in 15 minutes. Interview pressure is real and you can train for it.

Related Resources

Ready to practice?

Interactive questions with instant feedback. Predict outputs, find bugs, and master Javascript.

Start Practicing Free →⚡ Daily Sprint