41. In React, what is the first method called during the component lifecycle?
42. Which lifecycle method is commonly used to fetch data from an API in a React component?
43. Which lifecycle method should be used to perform cleanup when a component is unmounted?
44. What is the primary purpose of the render method in a React component?
45. Which method is invoked just before a component is removed from the DOM?
46. In React, which lifecycle method is called when a component receives new props?
47. What is the primary difference between componentWillReceiveProps and static getDerivedStateFromProps?
48. Which lifecycle method is recommended for performing side effects, such as data fetching, in a class component?
49. In functional components, which React hook replaces lifecycle methods like componentDidMount?
50. What is the purpose of the shouldComponentUpdate lifecycle method?