-
Notifications
You must be signed in to change notification settings - Fork 41
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
Remove axios dependency? #394
Comments
Hi Christian,
I cannot recall whether fetch had some restrictions at that point, e.g. poor support of cross origin requests. I think in the older days we even had to use JSONP. Do we consider axios as a problem, how big is the package as of 2024? To quote myself from #269:
Hope this gives you a starting point for further considerations. |
After scratching my head and reading through this comparison https://blog.logrocket.com/axios-vs-fetch-best-http-requests/ :
Whether these points stand by 2024 I cannot tell. We would have to re-implement stuff and test it. |
Hi @fschmenger , thanks for the detailed information and sharing your thoughts 👍 Still not sure, if we really "need" the axios library, but maybe it is not worth the work to re-implement everything with But then we should use axios in all spots, where we perform HTTP requests (as you also stated). And upgrade to its latest version. |
Hi team, Just wanted to give my point of view here even though I don't have the history of its inclusion in For sure, as @chrismayer said, However, I'd personally stick with it (and would by the way almost systematically add it in my custom apps) for many reasons. To name just a few of those reasons, due to the many features it has to offer if you need to make some API calls inside one app, due to built-in security protections (again if you need to make API calls) and due to the clarity of the written code and it's better error handling compared to However, I totally agree that if keeping it is the chosen path, it should be used everywhere in a consistent way. |
Thanks for your feedback @sronveaux! One good point you mentioned is the fact that I created an issue to ensure consequent usage of So going to close this. Thanks to all of you for your feedback and thoughts 👍 |
Currently the
axios
dependency is included into Wegue. It is used in the following files/modules:IMHO using
axios
is a rather big buy-in to do some HTTP GET-requests. This could be easily done by the built-infetch
-API. By usingfetch
we could avoid maintaining another dependency, by this reduce vulnerabilities and decrease build size.Any thoughts on this? Do I oversee something? Thanks for any input.
The text was updated successfully, but these errors were encountered: