[Vuejs]-Vue navigate to next route after 10 seconds

0👍

There are two things. If you wish to use setInterval then clear the interval using clearInterval. Use beforeDestroy hook to do that.

Or better yet, use setTimeout instead of setInterval. With setTimeout, you won’t have to clean up your timer. This is the recommended approach.

Leave a comment