DEV Community

Discussion on: How to Create a Simple React Countdown Timer

Collapse
 
rmar72 profile image
Ruben Solorio • Edited

Nice work! Learned good stuff and folks' comments! <3 Thanks!

Will point out that for more comprehensive timers a major problem with setIntervals or setTimeouts is that they're unreliable when switching between tabs/phone locks. Usually a 1000ms lag but can be arbitrary.
Solutions I've seen so far to the inaccuracy issue will be based on Date objects, Performance interface, requestAnimationFrame etc