Skip to main content

React Interview Cheat Sheet

Top 50 interview questions with concise answers. Print this page or save as PDF for offline study.

View All React Questions

1. What problem does React solve compared to directly manipulating the DOM?

2. What is JSX and why do we use it in React?

3. Why must React components start with a capital letter?

4. What is the purpose of the createRoot API introduced in React 18?

5. What is the difference between a Component and an Element in React?

6. What is the use of React Fragment?

7. Why do we use keys in lists?

8. What happens if we use the array index as a key?

9. What is the difference between props and state?

10. Can a component modify its own props?

11. What does useState() return?

12. Why doesn’t updating state directly trigger a re-render?

13. What is the purpose of useEffect?

14. What happens if you forget dependencies in useEffect?

15. What is controlled vs uncontrolled component in forms?

16. What is React Strict Mode and why is it useful?

17. What is Concurrent Rendering in React 18?

18. What is useId introduced in React 18?

19. What is the difference between useEffect and useLayoutEffect?

20. What are React Server Components?

21. How does React reconcile two virtual DOM trees during re-rendering?

22. Why is the render process pure but the commit phase is not in React?

23. What problem do React Server Components solve?

24. Why is data fetching in useEffect considered an anti-pattern in React 18+?

25. What is the difference between batching in React 17 and React 18?

26. Why does React warn when state is updated during rendering?

27. What is the purpose of the useTransition hook?

28. How does React decide which components to re-render?

29. Why must React state remain immutable?

30. What happens when state setters run inside loops outside event handlers?

31. What is the Render Prop pattern?

32. What problem does React Context solve?

33. How does React Context differ from Redux?

34. What does useReducer help solve?

35. Why should objects or arrays not be placed directly in dependency arrays?

36. What is memoization in React and when is React.memo useful?

37. What is the difference between useMemo and useCallback?

38. Why is lifting state up used in React?

39. What are controlled inputs and why can they hurt performance?

40. What is Suspense and why was it introduced?

41. How does Suspense differ in data fetching vs code splitting?

42. What is hydration in React?

43. What is partial hydration?

44. How does React handle synthetic events?

45. What is useDeferredValue used for?

46. How does React 19 improve hydration?

47. What is useOptimistic in React 19?

48. What is the difference between the use hook and await in React 19?

49. Why shouldn’t data fetching occur in constructors or render methods?

50. What is an error boundary?

Ready to level up? Start Practice