4 ms·
Can you please explain to a non-web-dev - why such a fuss about dropping jQuery? AFAIK it is just a small utility lib.
by zerr 6y ago
Can you please explain to a non-web-dev - why such a fuss about dropping jQuery? AFAIK it is just a small utility lib.
- mjtlittle 6y agoIts an extra (30kb) dependency for many projects that can solve the same problems using vanilla javascript with the same amount of friction
- democracy 6y agoAnd many projects/people don't care about not supporting anything but the latest chrome, so yes, for them it's a legacy.
- niclo 6y agoMost 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 ?
- democracy 6y agoits not about js compatibility it is more about platform / browser specific glitches
- cooper12 6y agoUnfortunately 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.
- democracy 6y agoreligion mostly :)
- samgranieri 6y agoJavaScript 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.