by throw2016 · 7y ago · 0 comments
jQuery remains as useful as ever and the constant sniping here is a dead giveaway of a faddish mindset of not just making one's own choice but trying to force it on others.
Fortunately for those who do not have hours and weeks of time navigating NPM dependency wildlands, jQuery represents a quick and efficient escape. If Vue or React offer better efficiency or simpler use, users will migrate swiftly but given the current state of affairs that seems unlikely, so they can coexist serving different use cases.
The idea that React or Vue can or should replace jQuery is more wishful than real given 90% of jQuery use cases are for websites and ajax calls that would not benefit from the massive overhead of a shadow dom and NPM workflow.
90% of what people used jquery for now is built in to browsers by default. Every dependency removed from your website is a win.
Sorry that this rant is hitting you, it's nothing personal, but this is somewhat a distraction.
Deliver the slim version from your own host and with an existing HTTP connection and it's just 70 KB without compressed transfer. That's very little, even on mobile.
People are regularly missing to optimize images and will easily transfer 100s of KB in image overhead on their sites, but they cry out for jQuery?
Or throw in a bunch of analytics stuff which gets you set back a significant amount of time and connections...
Really: Using jQuery is one of the smallest problems of modern web development.
On the other hand, people are integrating libraries for ANYTHING in their projects and don't care about that either.
Call me old-fashioned, but PHP + MySQL with HTML, CSS and a handful of jQuery has still brought me everywhere in terms of tech stack. Maybe I'm just doing shitty jobs, I don't know, but it works and the client is happy, so it doesn't look like a problem for me.