Pergunta de entrevista da empresa Tata Consultancy Services

How to stop setTimeout inside the useEffect