New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some features from useFetch also to useAxios #449
Comments
Or perhaps it's better to just use https://vueuse.org/core/useAsyncState/ for requests in general? |
Hey @3nuc, I would love to see the But I don't see any value in introducing breaking changes while refactoring the return type to match Feel free to open a PR 😉 Kind regards, |
Would love to align those interfaces. We can make aliases and for APIs and mark some as deprecated. Then drop them in along with the next major. |
Which one are we looking to align against? Make |
Aligning with useFetch looks better to me |
Sounds good, I'll make a PR sometime this week! |
Thanks a lot for starting to work on this @wheatjs! Supporting In your PR description you mention that you'd like to avoid adding more overrides or other config options. As far as I can tell, this could simply be done in an additive way with the existing and optional |
Thanks a lot for a great library! Supporting My main goal is to separate store logic and UI, and build a simple |
Currently useFetch has execute(), but useAxios does not. This means that with useFetch you can first create useFetch, set {immediate: false}, then execute() the call later, but with useAxios it fires immediately when you call useAxios.
Abort is also missing in useAxios.
Some properties don't make sense to add into axios such as statusText (since that's just in the axios response).
Another thing is that the returned property names are different in useAxios and useFetch, but changing that'd be a breaking change.
Exposed logic from both logics:
useAxios
useFetch
The text was updated successfully, but these errors were encountered: