DEV Community

Discussion on: Why not to use setInterval

Collapse
 
antialias profile image
Thomas Hallock

In order to understand why setInterval is evil

Thanks for the detailed explanation of setInterval in sync and async contexts, but why is it this "evil"? With a proper understanding of how the js event loop works, it's easy to understand the reason why a "new rhythm" gets established in the sync case, and why it doesn't in the async case.