Pregunta de entrevista de ScriptLanes

How does useEffect hook work in React?