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
When we use fetching APIs like fetch or axios, we need almost all the time to work with data, specially setting mapping response data.
Currently, the only solution i found to do that with useAxios is using watcher and i find this not optimize:
Add hooks like onFetchResponse, onFetchError and onFetchEnd like this is setup on useFetch
I dont know the best way to do it so i can't create PR for that, i hope that this idea will be found good and someone can implement this feature.
This will be awesome.
I think a parameter should be added to the options to monitor the callback function of the success or failure of the request. I have created a PR, and I hope the author can adopt it.
Clear and concise description of the problem
When we use fetching APIs like fetch or axios, we need almost all the time to work with data, specially setting mapping response data.
Currently, the only solution i found to do that with
useAxios
is using watcher and i find this not optimize:Suggested solution
Add hooks like
onFetchResponse
, onFetchError and onFetchEnd like this is setup on useFetchI dont know the best way to do it so i can't create PR for that, i hope that this idea will be found good and someone can implement this feature.
This will be awesome.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: