I am curious about why people use axios instead of the fetch api in react to make API requests. Is there any advantage to Axios over Fetch or is it just a personal choice ?
Looking to gain some diverse opinions on this.
Thankyou
Axios has extensive browser support; even the old browser IE11 can run smoothly. Fetch(), on the other hand, only confirms Chrome 42+, Firefox 39+, Edge 14+, and Safari 10.1+
Axios gives an easy-to-use API in a compact package for most of your HTTP connection needs. However, if you prefer to stick with native APIs, nothing stops you from achieving Axios features.
However, it's entirely possible to reproduce the Axios library's key features using the fetch() method provided by web browsers. Finally, whether it's worth loading a client HTTP API depends on whether you're comfortable working with built-in APIs.
Browser Support for fetch()
Further Reading
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With