Level 35
Maybe make use of setInterval in your mounted hook.
mounted() {
setInterval(this.fetchData(), 5000)
}
Also, consider if using websockets might be a better solution.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
What is the best way to pool data from the server in every 5 seconds?
Please or to participate in this conversation.