Shelf

Why and How jQuery Is Dying

By James Akpan

3 min read

TLDR: React didn't kill jQuery, human ambitions did.

In the early 2010s, jQuery was as big, if not bigger, than React. Frontend developers saw it as pure magic — "You mean I can manipulate a div in just one line of code? Where do I sign?"

jQuery had its time in the sun. Although thousands of websites are still using it, the decline since 2021 has been staggering. Here's a statistic I pulled from the internet:

The decline of jQuery usage since 2021

See the red circle in the chart above? That marks the point where the decline began.

But should the jQuery community really feel bad? When new frontend developers skip JavaScript tutorials or barely learn the fundamentals, what can a third-party library like jQuery expect?

jQuery could pull off some impressive tricks, but the new wave of libraries, like React, felt like a magic wand. I remember using jQuery to hide and show elements, even applying sleek animations that made the UI user-friendly. Still, those perks couldn't compare to what React offered.

jQuery didn't care how your HTML was structured — it just worked. But this flexibility came at the cost of code quality. React, on the other hand, brought structure and discipline to the table, changing the game.

Libraries like React made you pay due attention to EVERY aspect of your webapp while still being abstract. They made us feel powerful. They opened our eyes to how powerful web 2.0 truly was. And just like that, very few wanted to play with jQuery anymore.

In our defense, jQuery wasn't the best at sharpening your cognitive skills as a developer. If you wanted to master the art of writing spaghetti code, learn jQuery. (This is a personal opinion from using it in the early days of my career.) You could create multiple instances of an element, and it wouldn't bat an eye. You could literally overwrite your own code without even realizing it, and jQuery wouldn't complain. DOM manipulation was fast and easy, but structure? Nah, who needs that?

And don't even get me started on how jQuery encouraged you to blend HTML, CSS, and JavaScript into one chaotic soup. Inline styling, endless .append() calls — it was a hotbed for bad practices. Debugging? Good luck navigating that tangled mess of selectors and callbacks.

However, it got the job done but developers outgrew it. Something had to change. And here we are today.

Even if it's just a one page website with little to no DOM manipulation and pretty simple animations, most developers will always choose a framework to make it happen. Why? Ambition.

We always imagine the website will become robust in the future. We imagine the new features we will implement and automatically, almost subconsciously, we imagine that pure HTML, CSS and some jQuery wouldn't cut it.

So, React, Vue, Angular, or any modern library becomes the easy choice.

Whether jQuery makes a comeback (I chuckled, sadly, writing that) or fades into obscurity in the next 30 years, we can all learn one lesson from the former king of the web: this industry is always changing.

React and its co-libraries seem secure in the web ecosystem today, but don't assume they'll never fall. AI and new web technologies are constantly challenging the way we build high-performing websites, and one day, long after we retire, a new king will emerge.

So don't cling to any one web technology or practice. We need to be broad. Explore other languages. Understand how the web works — why buttons click, how the Chrome V8 engine works, why we need caching, how to reduce client-side load. Stay hungry. This is the only way to keep evolving in one of the most fast-paced careers in the world.