You are viewing a single thread.
View all comments View context
1 point

Unless you need to account for compat (DoD, gov’t contractors), easy cancellation (e.g. polling is necessary vs pubsub), upload progress (e.g. progress bars for large uploads), or better errors (axios throws on server errors, fetch, by default, replies OK).

It’s also nicer to configure - though I suppose you can just build classes for each fetch client on the frontend. Middleware - in particular, is easier in axios for advanced auth flows.

Native fetch is great, but saying no one uses one of the most installed (per weekly) packages on npm is just outright wrong.

Then again, this is a weird hill for me to die on so I’ll leave it. The confidence of your statement was just…strange. And for some reason I was compelled to comment.

permalink
report
parent
reply
1 point

Those are all just a compilation of special cases…

I didn’t say nobody uses it. There are so many projects using it, and I think no professional should be defaulting to including axios in their project unless absolutely necessary.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 6.9K

    Monthly active users

  • 731

    Posts

  • 11K

    Comments