Q. Which lifecycle method is equivalent to useEffect with an empty dependency array?
β
Correct Answer: (A)
componentDidMount
Explanation: useEffect with an empty array runs only once, just like componentDidMount in class components.