You may not need jQuery
tech-couch.com
You may not need jQuery
1–10 of 14 posts
Re: You may not need jQuery
#2Re: You may not need jQuery
#3That’s not necessary today because so much has been standardized. I find the CSS-selector based model to be appealing but you can get so many “spooky action at a distance” problems and it particularly drives me nuts in React applications where application state (not necessarily React state) can be manipulated both in React and also by jQuery behind React’s back.
People who are interested in declarative approaches are into HTMX and similar toolkits now.
Re: You may not need jQuery
#4I remember getting into an argument with my boss in 2005 because I told him that I mainly used jQuery to avoid having to deal with browsers having entirely different APIs to do AJAX request and otherwise avoid learning all the details of Javascript that were different on different browsers. That’s not necessary today because so much has been standardized. I find the CSS-selector based model to be appealing but you ca…
Especially in combination with modern frontend frameworks, complex frontend libraries like jQuery can cause all sorts of chaos. I remember it breaking one of my personal projects a while back that was using AngularJS.
Re: You may not need jQuery
#5Re: You may not need jQuery
#6I remember getting into an argument with my boss in 2005 because I told him that I mainly used jQuery to avoid having to deal with browsers having entirely different APIs to do AJAX request and otherwise avoid learning all the details of Javascript that were different on different browsers. That’s not necessary today because so much has been standardized. I find the CSS-selector based model to be appealing but you ca…
Re: You may not need jQuery
#7Re: You may not need jQuery
#8The vanilla JS append() and prepend() methods?
I understand there are differences w/these vs jQuery but, for discussion, why not use those?
https://developer.mozilla.org/en-US/docs/Web/API/Element/pre...
Re: You may not need jQuery
#9A lower-end device of 2023 is more than capable of downloading a few kb's of jQuery. There are certainly niche use cases to optimize for, but they are getting more and more niche, as average performance of mobile devices improves.
Re: You may not need jQuery
#10> which to this day [the append() and prepend() functions jQuery provides] have no direct competitor in vanilla js The vanilla JS append() and prepend() methods? I understand there are differences w/these vs jQuery but, for discussion, why not use those? https://developer.mozilla.org/en-US/docs/Web/API/Element/pre...
The closest you would get is this: https://developer.mozilla.org/en-US/docs/Web/API/Element/ins... But the jQuery prepend/append functions are still easier to read and shorter to write.