3
You need to refresh the page because mounted() executed only during creation of the component.
If you have variable and want to fetch a new data when this variable changed, you can use watch or computed. If you want to get a new data whenever it changed on server side you need to use websocket.
- [Vuejs]-Copy object and change nested property in Vue
- [Vuejs]-Using Vuetify in Laravel (Error: Vuetify is not properly initialized)
1
According to Vue lifecycle,if you want to fetch result on realtime you should put you code inside computed and watch property.
If any changes occur it will do two way binding with Html element and show changes without refreshing page
For More info go through this link โ https://v2.vuejs.org/v2/guide/computed.html
Source:stackexchange.com