JS
JS Interview
Interview
React
Interview
Playground
⌘K
Home
JS Concepts
DSA Patterns
Interview Prep
Playground
React Interview Prep
100 questions across hooks, state management, patterns, and performance
All
Easy
Medium
Hard
All Topics
Core & Rendering
Hooks & State
Patterns & Architecture
Performance & Advanced
Showing
100
of 100 questions
01
What is JSX and how does it get transformed into JavaScript?
easy
Core & Rendering
jsx
02
What is the virtual DOM and why does React use it?
easy
Core & Rendering
virtual-dom
03
How do you embed JavaScript expressions inside JSX?
easy
Core & Rendering
jsx
04
What are React keys and why are they important in lists?
easy
Core & Rendering
keys
05
What is `React.StrictMode` and what does it do?
easy
Core & Rendering
strict-mode
06
What are refs in React and when should you use them?
easy
Core & Rendering
refs
07
What are React Fragments and why would you use them?
easy
Core & Rendering
fragments
08
How does React's synthetic event system work?
easy
Core & Rendering
events
09
How does React's reconciliation algorithm decide what to update in the DOM?
medium
Core & Rendering
reconciliation
10
What are React Portals and when should you use them?
medium
Core & Rendering
portals
11
What are error boundaries and how do you implement one in React?
medium
Core & Rendering
error-boundaries
12
How does `React.lazy` work with `Suspense` for code splitting?
medium
Core & Rendering
suspense
13
What is the difference between controlled and uncontrolled components?
medium
Core & Rendering
controlled-components
14
What is `forwardRef` and when do you need it?
medium
Core & Rendering
refs
15
How does React's event delegation differ from native DOM event delegation?
medium
Core & Rendering
events
16
How does React batch state updates and what changed in React 18?
medium
Core & Rendering
reconciliation
17
How does event bubbling work with React Portals?
medium
Core & Rendering
portals
18
Why does StrictMode in React 18 simulate unmounting and remounting components?
medium
Core & Rendering
strict-mode
19
What is React Fiber and how does it improve rendering?
hard
Core & Rendering
virtual-dom
20
What are the limitations of error boundaries and how do you work around them?
hard
Core & Rendering
error-boundaries
21
How does `Suspense` work for data fetching and what changed with React 18's streaming SSR?
hard
Core & Rendering
suspense
22
What happens when you use an unstable key (like `Math.random()`) on a list element?
hard
Core & Rendering
keys
23
How does JSX handle boolean, null, and undefined values, and what pitfalls exist with falsy expressions?
hard
Core & Rendering
jsx
24
How does React's concurrent rendering model differ from synchronous rendering, and what are its implications?
hard
Core & Rendering
reconciliation
25
How do you use `useImperativeHandle` with `forwardRef` to expose a custom API from a child component?
hard
Core & Rendering
refs
26
What is the `useState` hook and how do you use it?
easy
Hooks & State
useState
27
How does the `useEffect` dependency array control when the effect runs?
easy
Hooks & State
useEffect
28
What is `useRef` and how is it different from `useState`?
easy
Hooks & State
useRef
29
What are the rules of hooks and why do they exist?
easy
Hooks & State
rules-of-hooks
30
How do you create and consume a context with `useContext`?
easy
Hooks & State
useContext
31
What is `useMemo` and when should you use it?
easy
Hooks & State
useMemo
32
What is `useCallback` and when does it improve performance?
easy
Hooks & State
useCallback
33
How do functional updates work with `useState` and why are they necessary?
medium
Hooks & State
useState
34
How does `useEffect` cleanup work and when does the cleanup function run?
medium
Hooks & State
useEffect
35
When should you use `useReducer` instead of `useState`?
medium
Hooks & State
useReducer
36
What is lazy initialization in `useState` and why would you use it?
medium
Hooks & State
useState
37
What is a stale closure in `useEffect` and how do you fix it?
medium
Hooks & State
useEffect
38
How do you use `useRef` to access and manipulate DOM elements?
medium
Hooks & State
useRef
39
How do you extract reusable logic into a custom hook?
medium
Hooks & State
custom-hooks
40
What is `useMemo` referential equality and why does it matter for child components?
medium
Hooks & State
useMemo
41
Why should you avoid using `useCallback` everywhere, and when does it not help?
medium
Hooks & State
useCallback
42
How do you share stateful logic between components using custom hooks vs. context?
medium
Hooks & State
custom-hooks
43
What is `useId` and why was it introduced in React 18?
medium
Hooks & State
useId
44
What is the difference between `useLayoutEffect` and `useEffect`?
hard
Hooks & State
useLayoutEffect
45
How does `useSyncExternalStore` work and when do you need it?
hard
Hooks & State
useSyncExternalStore
46
How do you handle complex state transitions with `useReducer` and TypeScript discriminated unions?
hard
Hooks & State
useReducer
47
What are the performance pitfalls of `useContext` and how do you mitigate them?
hard
Hooks & State
useContext
48
How do you build a custom hook that shares state across multiple components using `useSyncExternalStore`?
hard
Hooks & State
useSyncExternalStore
49
How do you write a custom hook that properly handles race conditions and AbortController?
hard
Hooks & State
custom-hooks
50
Why can't you call hooks conditionally, and what happens internally if you do?
hard
Hooks & State
rules-of-hooks
51
What is composition in React and why is it preferred over inheritance?
easy
Patterns & Architecture
composition
52
How do Higher-Order Components (HOCs) work in React?
medium
Patterns & Architecture
higher-order-components
53
What is the render props pattern and when is it useful?
medium
Patterns & Architecture
render-props
54
What are compound components and how do they share implicit state?
hard
Patterns & Architecture
compound-components
55
What is the provider pattern and how does it solve prop drilling?
easy
Patterns & Architecture
provider-pattern
56
What is the difference between controlled and uncontrolled components?
easy
Patterns & Architecture
controlled-uncontrolled
57
How does React.lazy enable code splitting and what are its requirements?
medium
Patterns & Architecture
code-splitting
58
What are React Server Components and how do they differ from Client Components?
medium
Patterns & Architecture
server-components
59
How do you decide when to lift state up versus using a state management library?
medium
Patterns & Architecture
lifting-state
60
How can you implement a state machine pattern using `useReducer`?
medium
Patterns & Architecture
state-machines
61
What is the slots pattern in React and how does it differ from children?
medium
Patterns & Architecture
composition
62
When should you use the `'use client'` directive and what does it actually do?
medium
Patterns & Architecture
server-components
63
How do you implement route-based code splitting in a React application?
medium
Patterns & Architecture
code-splitting
64
How do you design a compound component API that is both flexible and type-safe?
hard
Patterns & Architecture
compound-components
65
How does data flow from Server Components to Client Components in the RSC model?
hard
Patterns & Architecture
rsc-data-flow
66
How does the context selector pattern improve performance in React?
hard
Patterns & Architecture
context-patterns
67
How have custom hooks replaced the render props and HOC patterns?
medium
Patterns & Architecture
render-props
68
What are the trade-offs of HOCs versus custom hooks in modern React?
medium
Patterns & Architecture
higher-order-components
69
How do Suspense boundaries work for lazy-loaded components?
easy
Patterns & Architecture
lazy-loading
70
How should you handle nested context providers to avoid provider hell?
medium
Patterns & Architecture
provider-pattern
71
When should you use controlled versus uncontrolled components in complex forms?
hard
Patterns & Architecture
controlled-uncontrolled
72
What is the RSC serialization boundary and what types can cross it?
hard
Patterns & Architecture
rsc-data-flow
73
How do you decide which components should be Server Components versus Client Components?
easy
Patterns & Architecture
server-components
74
How do you handle error boundaries alongside Suspense in a code-split architecture?
hard
Patterns & Architecture
lazy-loading
75
How do you handle async data fetching in Server Components without `useEffect`?
hard
Patterns & Architecture
server-components
76
What does `React.memo` do and how does its default comparison work?
easy
Performance & Advanced
react-memo
77
What are the most common causes of unnecessary re-renders in React?
medium
Performance & Advanced
re-renders
78
When is `useMemo` actually worth using, and when does it add unnecessary overhead?
medium
Performance & Advanced
useMemo-useCallback
79
How does `useTransition` work and when should you use it?
medium
Performance & Advanced
useTransition
80
What is the `use()` hook in React 19 and how does it differ from `useEffect` for data fetching?
hard
Performance & Advanced
react-19-use
81
How does the React Profiler API help identify performance bottlenecks?
medium
Performance & Advanced
profiler
82
What is React's concurrent rendering model and how does it differ from synchronous rendering?
hard
Performance & Advanced
concurrent-features
83
How do React 19 form Actions work and what problem do they solve?
hard
Performance & Advanced
react-19-actions
84
How does `useDeferredValue` work and how does it compare to debouncing?
hard
Performance & Advanced
useDeferredValue
85
How does `useOptimistic` work in React 19 for optimistic UI updates?
hard
Performance & Advanced
useOptimistic
86
What strategies prevent a context value change from re-rendering every consumer?
medium
Performance & Advanced
re-renders
87
How does `useFormStatus` work and where must it be used?
medium
Performance & Advanced
useFormStatus
88
When should you avoid using `React.memo` and what are the tradeoffs?
medium
Performance & Advanced
react-memo
89
How does `useActionState` work in React 19 and how does it enable progressive enhancement?
hard
Performance & Advanced
useActionState
90
How do you test components that use hooks like `useState` and `useEffect` with React Testing Library?
medium
Performance & Advanced
testing
91
What is time slicing in React's concurrent renderer and how does it prevent UI jank?
hard
Performance & Advanced
concurrent-features
92
How do you build accessible React components with proper ARIA attributes?
medium
Performance & Advanced
accessibility
93
How does `useCallback` interact with `React.memo` and when is the combination necessary?
hard
Performance & Advanced
useMemo-useCallback
94
How does Suspense for data fetching work and what are the requirements for integrating with it?
hard
Performance & Advanced
suspense-data
95
How does `isPending` from `useTransition` differ from loading state managed with `useState`?
medium
Performance & Advanced
useTransition
96
How can `use()` read context values in React 19, and why is this useful?
hard
Performance & Advanced
react-19-use
97
How do you write integration tests for React components that interact with APIs using React Testing Library?
hard
Performance & Advanced
testing
98
What are server actions in React 19 and how do they differ from API routes?
hard
Performance & Advanced
react-19-actions
99
What is the difference between `key` as a reset mechanism and using `useEffect` cleanup for resetting component state?
easy
Performance & Advanced
react-memo
100
What are the common pitfalls when using `useEffect` that lead to performance problems?
easy
Performance & Advanced
re-renders