DEV Community

Discussion on: Hating jQuery doesn't make you cool

Collapse
 
dealloc profile image
Wannes Gennar

There's a difference between hating on JQuery, and knowing when it's simply not worth adding the dependency for something simple.
I am by no means a fan of JQuery, but when a client requests compatibility with IE6 (Oh yeah, enterprise sure loves their "if it ain't broke") being able to drop in JQuery sure makes things a lot easier.

generally though, JQuery used to solve the problem of compatibility which is (largely) not a problem anymore (see youmightnotneedjquery.com/).
As with all tools, it's useful for it's designed use cases

Collapse
 
tylerlwsmith profile image
Tyler Smith

I agree that knowing when it's not worth it to add a dependency for something simple is valuable. I think that jQuery's usefulness is more than just compatibility though.

jQuery is really good at DOM manipulation and has an easy-to-learn API. It's possible to write a site's back-end code in C, but most developers prefer to use something a little easier to learn and less verbose like PHP, Python or JS.

jQuery can make development a lot faster on some projects. It's not the right tool for every project, but it is for some.

Collapse
 
dealloc profile image
Wannes Gennar

jQuery definitely has a very neat API, but a lot of that API has been ported into the standard runtime (think sizzle etc), I haven't really found myself reaching back for jQuery when dealing with DOM modifications rather than the standard API (though I have to admit that adding a bunch of DOM elements can be cumbersome, that's usually the sign you're in need of something more template-like like Vue, Svelte etc when you don't need a full SPA)