Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript React Components (2018) Stateful Components and Lifecycle Methods Update the Stopwatch State with componentDidMount()

6,583 Points

Interval/Timeout throttling for timer?

From the materials below the video I understand that timeout calls are throttled to ~4ms so you could be off by a few ms on the timer because of this. But for such a simple timer would the 4ms really make a big enough difference to go through the trouble of all this previousTime/timeElapsed set up or could you just use setInterval with a 1000 ms increment instead of 100?