DEV Community

Discussion on: Mastering Axios: A Technical Guide to Building Your Food Delivery AppπŸ”βœ¨

Collapse
 
cookiemonsterdev profile image
Mykhailo Toporkov πŸ‡ΊπŸ‡¦ • Edited

Axios has some disadvantages, and the most critical is that it is much slover than fetch API.

Slower, it's because it uses XHR under the hood in the browser. Yeah, it is helpful for cases when you need the older browsers suppor. I would recommend recommend to use at least ky instead of axios, for better performance, though all mentioned features can be ease replicated by pure js.

Collapse
 
ankitakanchan profile image
Kita

Thank you for sharing your thoughts! You're right, Axios can be a bit slower because of XHR, but it's handy for older browser support. I'll definitely give ky a try to see how it compares. Always good to explore new tools!

Collapse
 
jayantbh profile image
Jayant Bhawal

Is the performance difference noticeable against any average APIs response time?

IMO given that an average API may take between 100-500ms to respond, axios being slower should not be the optimization devs should be focusing on.

There's other good reasons instead, such as fetch being capable enough and being supported without packages in both browser and nodejs.

Some comments have been hidden by the post's author - find out more