2021年4月30日星期五

how to prefetch axios request in vue?

in my app every time I go to a component it calls API request which I used in mounted(). Is there any way I can prefetch those Axios requests?

So, the app can become fast

        let workorder = ApiService.get(`/api/gangBoss/staff/${this.staff_id}`).then(          (response) => {            this.staff = response.data;          }        );        return workorder;      },      
https://stackoverflow.com/questions/67342295/how-to-prefetch-axios-request-in-vue May 01, 2021 at 10:03AM

没有评论:

发表评论