Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ynoth25's avatar

Inertia JS + VueJs pool data

What is the best way to pool data from the server in every 5 seconds?

0 likes
1 reply
drehimself's avatar

Maybe make use of setInterval in your mounted hook.

mounted() {
  setInterval(this.fetchData(), 5000)
}

Also, consider if using websockets might be a better solution.

Please or to participate in this conversation.