You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using execute from useAxios will stop working after a request has been aborted.
Similar implementation with useFetch will just work fine.
import{useFetch}from'@vueuse/core';import{useAxios}from'@vueuse/integrations/useAxios';const{data: fetchData,execute: fetchExecute,abort: fetchAbort,}=useFetch('https://reqres.in/api/users/2?delay=2',{},{immediate: false});const{data: axiosData,execute: axiosExecute,abort: axiosAbort,}=useAxios('https://reqres.in/api/users/2?delay=2',{},{immediate: false});functiongetDataWithFetch(){fetchAbort();// Abort current request.fetchExecute();// Still works after being aborted.}functiongetDataWithAxios(){axiosAbort();// Abort current request.axiosExecute();// Doesn't work anymore after being aborted.}
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Check that this is a concrete bug. For Q&A open a GitHub Discussion.
Describe the bug
Using execute from useAxios will stop working after a request has been aborted.
Similar implementation with useFetch will just work fine.
Reproduction
https://stackblitz.com/edit/vitejs-vite-xpwc3e/?file=src%2FApp.vue
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: