⚛️

React Interview Questions

44 questions · Hooks, components, performance, SSR and modern React interview questions.

44 results

1
ReactBeginner#fundamentals

What is React and why use it?

Open
2
ReactBeginner#jsx

What is JSX?

Open
3
ReactBeginner#props#state

Difference between props and state?

Open
4
ReactIntermediate#forms

What are controlled and uncontrolled components?

Open
5
ReactIntermediate#fundamentals#performance

What is the virtual DOM and reconciliation?

Open
6
ReactBeginner#lists

Why do lists need keys?

Open
7
ReactBeginner#hooks#state

What is useState and how do you update state correctly?

Open
8
ReactIntermediate#hooks#effects

Explain useEffect and its dependency array.

Open
9
ReactIntermediate#hooks

What are the rules of hooks?

Open
10
ReactIntermediate#hooks#refs

What is useRef used for?

Open
11
ReactAdvanced#hooks#performance

Difference between useMemo and useCallback?

Open
12
ReactAdvanced#performance

What is React.memo?

Open
13
ReactIntermediate#hooks#context

What is useContext and when do you use it?

Open
14
ReactAdvanced#hooks#state

When should you use useReducer instead of useState?

Open
15
ReactIntermediate#hooks

How do you create a custom hook?

Open
16
ReactIntermediate#effects#data

How do you fetch data in a React component?

Open
17
ReactAdvanced#effects#debugging

What causes an infinite re-render loop?

Open
18
ReactIntermediate#state#patterns

What is lifting state up?

Open
19
ReactIntermediate#patterns#context

What is prop drilling and how do you avoid it?

Open
20
ReactBeginner#patterns

What is the children prop and composition?

Open
21
ReactBeginner#jsx

What are fragments and why use them?

Open
22
ReactBeginner#jsx

What is conditional rendering in React?

Open
23
ReactAdvanced#errors

What is an error boundary?

Open
24
ReactIntermediate#lifecycle#hooks

How does the component lifecycle map to hooks?

Open
25
ReactAdvanced#performance

What is lazy loading and code splitting in React?

Open
26
ReactAdvanced#performance#data

What is Suspense?

Open
27
ReactAdvanced#patterns

What are higher-order components (HOCs)?

Open
28
ReactAdvanced#patterns#dom

What are React portals?

Open
29
ReactAdvanced#performance

How do you optimise performance in a React app?

Open
30
ReactAdvanced#ssr#seo

What is the difference between client-side and server-side rendering?

Open
31
ReactAdvanced#ssr

What is hydration?

Open
32
ReactIntermediate#forms

How do you handle forms and validation in React?

Open
33
ReactAdvanced#hooks#effects

What is the difference between useEffect and useLayoutEffect?

Open
34
ReactIntermediate#effects#debugging

What is StrictMode and why does my effect run twice?

Open
35
ReactAdvanced#state#patterns

How do you share state between distant components?

Open
36
ReactAdvanced#state#data

What is the difference between server state and client state?

Open
37
ReactIntermediate#state

Why should you not mutate state directly?

Open
38
ReactIntermediate#routing

How do you handle routing in React?

Open
39
ReactBeginner#props

What are default props and prop validation today?

Open
40
ReactBeginner#fundamentals

What is the key difference between class and function components?

Open
41
ReactIntermediate#debugging

How do you debug a React app?

Open
42
ReactAdvanced#testing

How do you test React components?

Open
43
ReactIntermediate#accessibility

What accessibility basics should a React component follow?

Open
44
ReactAdvanced#context#performance

How do you avoid unnecessary re-renders from context?

Open