Which hook in functional components is equivalent to both constructor and componentDidMount combined?
The useEffect hook with an empty dependency array ([]) is roughly equivalent to a combination of constructor and componentDidMount in class components. It runs once after the initial render, similar to how componentDidMount executes after the component mounts.