It may seem like jQuery has been dead for years, but it is still widely used in 2022. But should you take the time to learn it?
I came across a tweet that raised this question. It made me stop and think. jQuery? Really? It’s 2022.
Curious about its usage today, I did some light googling.
W3Techs reports jQuery being used on at least one page in 77.4% of the top 10 million websites (at the time of writing this), or 94.8% of sites using at least one common JS library.
In contrast, React — which we hear much more about on Twitter — is used in only 2.9% of those sites. Even Lodash and Moment — super popular libraries that whose popularity has faded in recent years — both sit below 5%.
jQuery is still widely used. Far more than any other JavaScript library.
That said, it’s become irrelevant with the advent of component-driven libraries like React, Vue, and others. If you work exclusively on new projects (which sounds like a dream), you may be able to avoid working with jQuery.
But, chances are high that you’re going to come across jQuery at some point in your career. It’s not likely to be on a new project. It may be in supporting a legacy project. It may be in having to look through old code while building a new website. It may be that a single page has some legacy behavior that a client doesn’t want to replace, and you have to support it.
Whatever it may be, you’ll probably encounter it at some point.
If a dev asked me if they should learn jQuery today, I’d say no. Don’t learn it. But be familiar with it. Know it exists and understand the general syntax enough to recognize it.
If you have to work with it, use the docs and countless other resources around the web to learn jQuery more deeply, only as much as needed to support your work.
There’s so much changing all the time in front-end development, you don’t need another thing to proactively learn.