I write method using store, but I want it to run every time the page is refreshed without clicking the button, how can I do this
Asked
Active
Viewed 677 times
2
-
1Does this answer your question? [How to call a vue.js function on page load](https://stackoverflow.com/questions/40714319/how-to-call-a-vue-js-function-on-page-load) – JHeth Aug 16 '20 at 19:27
-
1Invoke the method from mounted(). See this doc https://vuejs.org/v2/guide/instance.html. – danh Aug 16 '20 at 19:27