3 ms·
I've not used it in a new project for a long time, but I often still work on projects with legacy jQuery code. The main reason to still use it imo it is simply
by kypro 4y ago
I've not used it in a new project for a long time, but I often still work on projects with legacy jQuery code.
The main reason to still use it imo it is simply that a lot of devs are familiar with the API and they have really good docs.
While I prefer vanilla JS for JS-light projects, I'm also aware of some cross-browser weirdness and combability issues you might run into with a vanilla JS project. The nice thing JQuery is that you know it will work as expected on the all browsers it supports so you don't need to worry about cross-browser testing your code. It also makes certain things easier to do like basic JS animations.
The main reason care about the latest releases is that they patch security issues from time to time.
- collyw 4y ago> I'm also aware of some cross-browser weirdness and combability issues you might run into with a vanilla JS project. That was the main reason that jQuery got popular if I remember correctly (though I have always been an 85% backend developer). I was under the impression that that isn't really an issue these days, but everyone is building overly complex monstrosities with React or whatever else is flavor of the month.
- lelandfe 4y agohttps://webkit.org/blog/12288/working-together-on-interop-2022/ https://webkit.org/blog/12288/working-together-on-interop-20... The various browsers have gotten together and work awfully hard to fix outstanding quirks. You'll still encounter cross-browser oddities here and there, but it's generally more in the order of, "X browser hasn't added this method yet"
- The_Colonel 4y agoYes, the cross browser weirdness is nothing like it used to be. The other raison d'être is the API, which is simply much better than even the latest DOM API. It's actually pretty remarkable that jQuery API feels spot on even after 16 years.
- eyelidlessness 4y agoI was jQuery’s target audience at its heyday and at least for me, the big thing it brought to the table was $ and what’s now called a “fluent API” ($ methods return $ instances unless they’re getters for primitives; it’s pretty much still my preferred way to explain the general concept of monads to people familiar with the pattern). Browser compatibility was just delicious icing on the cake.
- jamesfinlayson 4y agoYeah I thought that many of the last few releases were security fixes more than anything.