Question 1 of 10

How does the useEffect hook work in React? What is the purpose of the dependency array, and what happens when you pass an empty array versus no array at all?