DEV Community

Discussion on: No, React didn't kill jQuery

Collapse
 
ben profile image
Ben Halpern

Yeah, I agree with all of that... Except I still think the downsides of library size still makes the tradeoff not worth it.

This isn't a hill I'd die on, but it's the side of the coin I'd fall on. If I'm going to drop in a convenience lib I'd rather go with something a lot lighter. Of course if you're building desktop software, internal tools, etc—it probably wouldn't be a big concern. But if you're building for the masses I'd try and be stricter on my budget than to immediately reach for jQuery, even if it is slimmer these days than its peak.

Collapse
 
brandinchiu profile image
Brandin Chiu

You could always use JQueries native tools to build a smaller library with only the components you need if space is a concern (which it definitely should be)

:)

Collapse
 
eaich profile image
Eddie • Edited

An ongoing joke I have with some of my dev friends is that we argue and debate over payload sizes and when we're done, we put our headphones on and start streaming Spotify at 320 kbps. Haha.

Fair points. However, comparatively, the size of jQuery is relatively small or on par with other libs. jQuery core is 31.3 KB compressed. Meanwhile, Notion, AirTable and other modern apps have JS payloads of over 7 MB, and they don't have a shortage of users. Depends on the target users.

I'd say that the size alone of the libs shouldn't be the only measurement. We should consider the added benefits of that payload throughout the system to justify its size.