-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Why use axios if there is a fetch #3899
Comments
The team already told you that one of the benfits of using that is the same api for this library in browser and nodejs environment. Moreover it has good approaches to use different testing utils to mock and unmock an instance of axios which can be used for specific endpoint. And these are not all bullet points of its pros |
You find a lot already on stackoverflow to this question :-) |
Went looking for the answer to the question, found the following benefits of Axios over fetch:
|
Closing off topic |
Describe the issue
I want to understand the advantages of using axios compared to fetch. I suggest that everyone write an example code that will show why you are using axios or an example code that you think will be difficult to repeat using fetch. And I will throw off a simple example code that will do the same thing but using fetch and the usual approaches of writing code.
I want to show with these examples that using fetch you can do everything the same as using axios, but for this you do not have to learn a new library, you just need to have basic programming skills. Or during the discussion, I will understand that axios is more optimal than fetch.
The problems you face when using axis, unlike fetch
Example Code
Expected behavior, if applicable
Environment
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: