DEV Community

Discussion on: Axios or fetch(): Which should you use?

Collapse
brieucp profile image
brieucp

Well, axios is 12.6KB minified.

Thread Thread
pavelloz profile image
Paweł Kowalski

Native fetch is 0KB minified. ;)

Thread Thread
brieucp profile image
brieucp • Edited on

Yes it's true, but this can apply to any library and frameworks. Vanilla is always lighter except for the amount of boilerplate code it can bring. And fetch can bring a tons of boilerplate.

I'll cut 3KB (gzipped) on the framework any day to have a good base for the service layer.

Thread Thread
pavelloz profile image
Paweł Kowalski • Edited on

I guess priorities differ.

Im not willing to import 12KB of abstractions to use one/two methods of it and i didnt find fetch to bring a lot of boilerpate for me.