Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, and the main historical reasons people used jQuery was for smoothing over browser discrepancies and using CSS selectors in JS, but with IE9 we have `querySelectorAll` which made what was jQuery's biggest selling point for many, standard to vanilla JS.

I also find it more confusing to teach to beginners than equivalent vanilla JS, and easier to make performance-hurting mistakes.



jQuery’s API is still (and, probably, forever will be) miles ahead of the native DOM API.

Cross browser compatibility was just one of the reasons the world fell in love with jQuery.


Personally, I find it miles behind the modern native DOM API, which is what I prefer now, but I guess to each their own!

(And I'm not even against jQuery, I used it extensively mid-2000s-2010s, including on fairly large SPAs, and even taught a class with it for a little under 2 years, but again, to each their own)


It's a lot more verbose and less powerful.

I mean, the http://youmightnotneedjquery.com site reads like a parody even in 2021.


I guess it truly does come down to preference and perception, as looking over that link you provided I actually had the opposite reaction!

I prefer the DOM API in each example, save for examples that are clearly out of date to support old versions of IE without a polyfill (e.g. all the AJAX examples at the top can use fetch, other can use Object.assign, no use of the iterator interface anywhere, etc)


This is something I really can't fathom.

It takes twice as much typing without the chainable, unix pipe like API. I really don't get it, but I've been baffled by this industry's decision for more than a decade.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: