DEV Community

Discussion on: React Data Fetching

Collapse
 
constantinchirila profile image
Constantin Chirila

Hey Justin, I would like to point out that in terms of size comparison please do use services like bundle-phobia.
Why would you compare the repository sizes then say that SWR at least in the size comparison. Gzipped react-query has 6.2kb, while SWR has 6.1kb. Basically the same.
I can't comment on the rest, but this particular issue really irked me as you mentioned a few times the miraculous size of SWR :)

Collapse
 
justinramel profile image
Justin Ramel

Hey Constantin, bundle-phobia looks like a great site thanks. I was going purely off the sizes reported on npmjs.com, react-query is currently reporting as 702 kB.

I've been meaning to post a follow-up about react-query, I'm now using it instead of SWR. The react-query dev tools are awesome!

Collapse
 
constantinchirila profile image
Constantin Chirila

Understanble, but what's reported on npm is the package size, not the bundle size. :)