Pregunta de entrevista de Tata Consultancy Services

How to stop setTimeout inside the useEffect