Hacker News new | past | comments | ask | show | jobs | submit login

Can you please explain to a non-web-dev - why such a fuss about dropping jQuery? AFAIK it is just a small utility lib.



JavaScript didn't work well across all browsers a decade or more ago, and jQuery made it easier to write JavaScript without resorting to browser-specific hacks. It also added some elegant features.

JavaScript has improved so much you don't need jQuery anymore.


Its an extra (30kb) dependency for many projects that can solve the same problems using vanilla javascript with the same amount of friction


Unfortunately vanilla JS is much less readable. JQuery function names make your intent very clear and chaining them is elegant. Also, very minor, but the "magic" (syntactic sugar) provided by `$()` compared to `document.querySelectorAll()` et al. makes using JQuery seem much more frictionless, especially since you know if you're using it, all the functions will work on whatever you selected and can also take HTML strings, etc.

One thing vanilla JS does have going for it though is performance. I profiled a script of mine and rewrote all the bottlenecks using native JS and it's undoubtedly faster.


And many projects/people don't care about not supporting anything but the latest chrome, so yes, for them it's a legacy.


Most if not all the modern frameworks/projects use Babel to compile modern Javascript to the es5 standard from 2009. I guess 11 years of browser backwards compatibility are enough, or should we downgrade and support IE 6 ?


its not about js compatibility it is more about platform / browser specific glitches


religion mostly :)




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

Search: