Hacker News new | ask | show | jobs
by stupidcar 1576 days ago
What are you talking about? The setInterval example is completely idiomatic React hooks. It is literally given in the React docs:

https://reactjs.org/docs/hooks-faq.html#what-can-i-do-if-my-...

1 comments

Reading it now, the language I used was inappropriate. You're correct, the stated problem is common with registering and triggering self-repeating and timed loops.

That was really my point, don't do that.