Live data from Hacker News

Ask HN: Does anybody still use jQuery?

news.ycombinator.com

1–10 of 45 posts

Ask HN: Does anybody still use jQuery?

#1
I know that frameworks such as React and Vue have taken over most of the mindshare, but I still find jQuery easier to use and often more productive, especially for smaller websites.

Even when using a framework I usually include jQuery to smooth out the edges where the framework does not behave as I would have expected, or seems to make implementing a part of the intended UX awkward or complicated.

Is anybody else still relying on jQuery in some capacity, and if so, what value do you get out of it? Do you use it along with one of the major frameworks, or together with smaller libraries? And do you plan on dropping it soon?

Re: Ask HN: Does anybody still use jQuery?

#3
Yes, it is a good tool for one of my projects where I need to cleanup some html, is very good for DOM manipulation. It is also a very good tool for simple webpages, If I have some mostly static thing that I need to show I can render that on the server with PHP and have jQuery insert it on the right place and handle some events,

Re: Ask HN: Does anybody still use jQuery?

#4
I would be surprised if a majority of new projects with a JavaScript library weren't using jQuery. I personally moved on a few years ago and I suspect that's the case with many people who respond on HN, but there are still plenty of valid use cases, particularly when JS needs are simple and backwards compatibility is really important.

If you're doing projects with light functionality and already know jQuery cold, you really don't gain much from React, Vue, et al for that project. You may gain something personally (career path, different way of thinking, etc), but that is a different topic.

For anything slightly above the basics, I'd recommend Vue as a great alternative to jQuery. No build tools required and it's easy to stay in the realm of plain HTML, CSS, and JS. It also "progresses" really nicely if you have more complex needs later on -- that would be a main benefit over a tool like jQuery.

Re: Ask HN: Does anybody still use jQuery?

#5
I stopped using jQuery after I started a rather large Angular project 2 years ago.

Since then, I had one project where using jQuery and jQuery UI was dramatically easier than building out a datepicker input by hand; however, for everything else, vanilla js is my go to.

Re: Ask HN: Does anybody still use jQuery?

#6
Of course. We're not all mobile app developers on HN. Some of us still make small info sites, or prototypes. And me, I'm actually a backend sysop but my hobby of developing websites keeps me branching out. So I've never developed a web/mobile app with a framework, and still use jquery for simple websites.

Re: Ask HN: Does anybody still use jQuery?

#8
You are right that jQuery is dying:

https://trends.google.com/trends/explore?date=today%205-y&q=...

5 years ago, jQuery was twice as popular than it is today. But I wouldn't call it dead just yet. It's a work in progress.

By the way - one of the things that killed jQuery is HTML5, it's not only Vue and React for more advanced features, a lot of people used jQuery for basic DOM manipulation, which today you can probably get away with just fine with the HTML5 DOM API, since the addition of the querySelector APIs and things like CSS's classList APIs.

Re: Ask HN: Does anybody still use jQuery?

#9
The company I work at uses jQuery for most DOM manipulation. I'm a backend developer and already knew it a bit so it's easier for me than using React for simple things. I don't do any frontend outside of work, so I've never gone past the React tutorial on my own time, and I suspect many mainly-backend developers have a similar story.

Re: Ask HN: Does anybody still use jQuery?

#10
What you used jQuery for hasn't so much been replaced by React and what not, as it has by native Javascript. Most of the things you used to do through jQuery are done with regular Javascript (and DOM API's) just as easy nowadays - depending on your browser demographics, of course, but will be fine most of the time.
Post reply on HN