Black Friday: the Laravel testing course is $149 instead of $249, through Dec 7. See the course →
logo

A Vite HMR gotcha when using setInterval

Mostly hits Vue and React projects

Joel Clermont
Joel Clermont
2026-05-08

From our daily Laravel tips email. Get the next one in your inbox.

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.

Want a tip like this in your inbox every weekday?

Each one takes less than 2 minutes to read. Join 4,000+ Laravel developers who already get them.

email
No spam. Only real-world advice.
Toss a coin in the jar if you found this helpful.