Will we ever need to use useEffect in React without any dependency? [duplicate] Similar questions have been asked here and here, but I still can’t see a perfect use case for useEffect without any dependency array. Could someone show me an example where we must use the useEffect hook without any dependency array?