J
J
Juniorrrrr2021-06-11 12:16:45
React
Juniorrrrr, 2021-06-11 12:16:45

How to stop recursive timeout by parameter?

There is dynamic data that arrives from the back, to which I must react in the timer and stop it. There is an example

in the sandbox . I want to stop all timeouts as soon as the counter is equal to 1.

Please tell me what I'm doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gary_Ihar, 2021-06-11
@Gary_Ihar

During the update of the components, clean your timer. And then you get a hell of a lot of timers running and a memory leak, and that's all ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question