logo

A Vite HMR gotcha when using setInterval

Mostly hits Vue and React projects

Joel Clermont
Joel Clermont
2026-05-08

If you've ever started a setInterval inside a Vue or React component, Vite's hot module replacement can quietly leave you with two timers racing each other.

The first time this happens, you might be surprised, but in today's video I walk you through the problem and lead you toward the correct solution.

Watch Now (3 min)

And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.

Here to help,

Joel

P.S. Stuck on a head-scratcher like this in your Laravel project? Schedule a call with us.

Toss a coin in the jar if you found this helpful.
Want a tip like this in your inbox every weekday? Sign up below 👇🏼
email
No spam. Only real-world advice.