3 ms·
My argument for using axios is developer ergonomics. There are a few libraries that I use both in the frontend and the backend, for which I gladly accept the in
by heipei 6y ago
My argument for using axios is developer ergonomics. There are a few libraries that I use both in the frontend and the backend, for which I gladly accept the increased bundle size: axios, lodash, moment, Q. My users get the benefit in me being able to ship features faster because I don't have to constantly keep up with which feature ships in which browser version etc. I also found the fetch API horrendous to use. It's a tradeoff I'm willing to make.
- whycombagator 6y agoDo you take on the entire of Lodash as a dependency? If so, do you use any of the Lodash features not described here?[0] If you use more than described, or if a specific Lodash feature is more performant, you can selectively import[1]. [0] https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore https://github.com/you-dont-need/You-Dont-Need-Lodash-Unders... [1] https://www.npmjs.com/search?q=keywords:lodash-modularized https://www.npmjs.com/search?q=keywords:lodash-modularized
- brlewis 6y agoWhen you found the fetch API horrendous were you using async/await? They make it not horrendous. You don't have to keep up with which feature ships in which browser; that's what browserslist is for. https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md https://github.com/facebook/create-react-app/blob/master/pac...