Pregunta de entrevista de BrowserStack

Is useEffect with empty dependency array and IIFE function do the same thing in react?