React js Interview Questions & Answers

Top frequently asked interview questions with detailed answers, code examples, and expert tips.

50 Questions All Difficulty Levels Updated Mar 2026
1

What is React? Easy

React is a JavaScript library for building user interfaces. It uses a component-based architecture and virtual DOM to efficiently update and render UI components.
basics virtual-dom
2

What is Virtual DOM? Easy

Virtual DOM is a lightweight JavaScript representation of the real DOM. React compares the Virtual DOM with the previous version and updates only changed parts in the real DOM.
virtual-dom performance
3

What are components in React? Easy

Components are reusable UI building blocks. They can be functional components or class components.
components
4

What is JSX? Easy

JSX is a syntax extension that allows writing HTML-like code inside JavaScript. It gets compiled into React.createElement calls.
jsx
5

Difference between Functional and Class components? Easy

Functional components are simpler and use hooks. Class components use lifecycle methods and this keyword.
components architecture
6

What are React Hooks? Easy

Hooks are functions that let you use state and lifecycle features in functional components.
hooks
7

What is useState? Easy

useState is a hook that allows adding state to functional components.
hooks state
8

What is useEffect? Easy

useEffect is used for handling side effects like API calls, subscriptions, and DOM updates.
hooks useeffect
9

What are props? Easy

Props are read-only inputs passed from parent to child components.
props
10

What is lifting state up? Easy

Lifting state up means moving state to the closest common parent so multiple components can share it.
state-management
11

What is reconciliation? Medium

Reconciliation is the process React uses to update the DOM efficiently by comparing previous and new virtual DOM trees.
virtual-dom performance
12

What are keys in React? Medium

Keys help React identify which items changed, added, or removed in a list.
lists performance
13

What is Context API? Medium

Context API allows sharing global state like themes or auth data without prop drilling.
context-api state-management
14

What is prop drilling? Medium

Prop drilling is passing props through multiple intermediate components.
architecture
15

What is useMemo? Medium

useMemo memoizes computed values to optimize performance.
performance optimization
16

What is useCallback? Medium

useCallback memoizes functions to prevent unnecessary re-renders.
performance optimization
17

What is React.memo? Medium

React.memo prevents unnecessary re-renders of functional components.
performance
18

What is useRef? Medium

useRef creates a mutable reference that persists across renders.
hooks
19

What is controlled component? Medium

A controlled component is one where form data is handled by React state.
forms
20

What is uncontrolled component? Medium

Uncontrolled components store their own state internally using refs.
forms
21

What is Redux? Medium

Redux is a predictable state container for managing global application state.
redux state-management
22

Difference between Redux and Context API? Medium

Redux is more powerful for complex state logic and middleware. Context API is simpler and built-in.
redux context
23

What is React Router? Medium

React Router is a library for handling routing in React applications.
routing
24

What are higher-order components? Medium

HOCs are functions that take a component and return a new enhanced component.
advanced-patterns
25

What is lazy loading? Medium

Lazy loading loads components only when needed using React.lazy.
performance
26

What is Suspense? Medium

Suspense allows handling loading states while components are lazily loaded.
performance
27

What are error boundaries? Hard

Error boundaries catch JavaScript errors in component trees.
error-handling
28

Explain React Fiber. Hard

React Fiber is the reconciliation engine that improves performance by breaking rendering into units of work.
architecture fiber
29

What is server-side rendering? Hard

SSR renders React components on the server before sending HTML to the browser.
ssr nextjs
30

What is hydration? Hard

Hydration attaches event listeners to server-rendered HTML.
ssr
31

Explain Concurrent Rendering. Hard

Concurrent Rendering allows React to interrupt and resume rendering work.
react18 performance
32

What is StrictMode? Medium

StrictMode highlights potential problems in development mode.
debugging
33

What is code splitting? Medium

Code splitting splits bundle into smaller chunks for better performance.
optimization
34

What is tree shaking? Medium

Tree shaking removes unused code during bundling.
bundling
35

Explain React lifecycle methods. Medium

Lifecycle methods include mounting, updating, and unmounting phases.
lifecycle
36

Difference between useEffect and useLayoutEffect? Hard

useLayoutEffect runs synchronously after DOM mutations.
hooks performance
37

What is custom hook? Medium

A custom hook is a reusable function using React hooks.
hooks
38

How to optimize React app performance? Hard

Use memoization, code splitting, lazy loading, and efficient state updates.
optimization
39

What is Portal in React? Hard

Portals allow rendering components outside the root DOM hierarchy.
advanced-patterns
40

What is reconciliation algorithm? Hard

React uses diffing algorithm to compare trees efficiently.
virtual-dom
41

What is React DevTools? Easy

React DevTools is a browser extension for debugging React apps.
debugging
42

Explain batching in React. Hard

Batching groups multiple state updates into one re-render.
performance
43

What is useTransition? Hard

useTransition allows marking updates as non-urgent in React 18.
react18
44

What is useDeferredValue? Hard

useDeferredValue defers a value update to improve performance.
react18
45

What are fragments? Easy

Fragments let you group multiple elements without adding extra DOM nodes.
jsx
46

What is React.StrictMode used for? Medium

It identifies unsafe lifecycle methods and potential issues.
debugging
47

What is reconciliation vs rendering? Hard

Reconciliation compares trees; rendering updates DOM.
architecture
48

How does React handle forms? Easy

Using controlled components with state.
forms
49

What is hydration mismatch? Hard

It occurs when server-rendered HTML does not match client rendering.
ssr
50

Explain React architecture for enterprise apps. Hard

Use modular architecture, state management, code splitting, lazy loading, and CI/CD pipelines.
architecture enterprise
📊 Questions Breakdown
🟢 Easy 13
🟡 Medium 22
🔴 Hard 15
🎓 Master React js Training

Join our live classes with expert instructors and hands-on projects.

Enroll Now

What People Say

Testimonial

Nagmani Solanki

Digital Marketing

Edugators platform is the best place to learn live classes, and live projects by which you can understand easily and have excellent customer service.

Testimonial

Saurabh Arya

Full Stack Developer

It was a very good experience. Edugators and the instructor worked with us through the whole process to ensure we received the best training solution for our needs.

testimonial

Praveen Madhukar

Web Design

I would definitely recommend taking courses from Edugators. The instructors are very knowledgeable, receptive to questions and willing to go out of the way to help you.

Need To Train Your Corporate Team ?

Customized Corporate Training Programs and Developing Skills For Project Success.

Google AdWords Training
React Training
Angular Training
Node.js Training
AWS Training
DevOps Training
Python Training
Hadoop Training
Photoshop Training
CorelDraw Training
.NET Training

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators