React Interview Questions

React Interview Questions
  1. What is React?

  2. Who developed React?

  3. What is a component in React?

  4. What are functional components?

  5. What are class components?

  6. What is JSX?

  7. Why do we use JSX?

  8. How do you create a React component?

  9. What is the difference between a class component and a functional component?

  10. What are props in React?

  11. What is state in React?

  12. How is state different from props?

  13. What is the virtual DOM?

  14. How does React use the virtual DOM?

  15. What is the lifecycle of a React component?

  16. What are lifecycle methods?

  17. What is componentDidMount()?

  18. What is componentDidUpdate()?

  19. What is componentWillUnmount()?

  20. What is a hook in React?

  21. Name some common hooks in React.

  22. What is useState hook?

  23. How does useEffect work?

  24. What is the difference between useEffect and lifecycle methods?

  25. What is a controlled component?

  26. What is an uncontrolled component?

  27. How do you handle events in React?

  28. What is the difference between HTML events and React events?

  29. What is conditional rendering?

  30. How do you do conditional rendering in React?

  31. What is the difference between React and Angular?

  32. What is the purpose of keys in React lists?

  33. Why should keys be unique?

  34. What is the React.Fragment?

  35. How do you pass data between React components?

  36. What is lifting state up?

  37. What is context in React?

  38. When should you use React Context?

  39. How do you create a context?

  40. What is Redux?

  41. How does Redux work with React?

  42. What is the difference between Redux and React Context?

  43. What are Higher-Order Components (HOC)?

  44. What is the purpose of HOCs?

  45. What are React refs?

  46. How do you create refs?

  47. What is the difference between controlled and uncontrolled inputs?

  48. How do you optimize React performance?

  49. What is React.memo?

  50. What is the difference between React.memo and PureComponent?

  51. What is prop drilling?

  52. How do you avoid prop drilling?

  53. What is the use of useCallback hook?

  54. What is the use of useMemo hook?

  55. What are React portals?

  56. How do portals work?

  57. What is error boundary in React?

  58. How do you create an error boundary?

  59. What is server-side rendering (SSR)?

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

  61. What is React.lazy?

  62. How does code splitting work in React?

  63. What is Suspense in React?

  64. What is the purpose of keys in React lists?

  65. How do you handle forms in React?

  66. What is the difference between useState and useReducer?

  67. What is the role of the React Router?

  68. How do you implement routing in React?

  69. What is the difference between React Router v5 and v6?

  70. What is reconciliation in React?

  71. What is the use of shouldComponentUpdate()?

  72. What is a PureComponent?

  73. What is the significance of the key prop in React?

  74. What are synthetic events in React?

  75. How do you pass arguments to event handlers?

  76. How do you prevent default behavior in React events?

  77. What is the difference between state and props?

  78. What is lifting state up?

  79. What is a React hook?

  80. What is the useEffect cleanup function?

  81. How does React handle forms?

  82. What is the difference between controlled and uncontrolled forms?

  83. What is the difference between React 16 and React 17?

  84. What are fragments in React?

  85. What is JSX?

  86. Can browsers read JSX directly?

  87. How is React different from Vue?

  88. What is React Native?

  89. What is reconciliation?

  90. What is a pure function component?

  91. What is React Fiber?

  92. What is the use of default props?

  93. How do you set default props in React?

  94. What is propTypes?

  95. How do you validate props in React?

  96. What is Strict Mode in React?

  97. How do you update state in React?

  98. What is event delegation in React?

  99. What is the use of keys in React lists?

  100. What is the difference between React and ReactDOM?

Share: