Live data from Hacker News

Ask HN: I'm curious to know why should we use jQuery now?

news.ycombinator.com

1–10 of 11 posts

Re: Ask HN: I'm curious to know why should we use jQuery now?

#2
I use it purely for the syntactic sugar. It's less characters to type than vanilla JS[0]. I've toyed with Cash[1] too which I use for small projects that don't need the entire jQuery lib.

[0] https://youmightnotneedjquery.com/

[1] https://kenwheeler.github.io/cash/

Re: Ask HN: I'm curious to know why should we use jQuery now?

#4
Mainly because so much jQuery already out there. For a fresh project it's harder to make an argument for it, but if you work with legacy code you probably have to know jQuery.

Personally I like jQuery. Like so many developers I started using it a long time ago because it solved numerous browser inconsistencies and incompatibilities. Then I got used to the clean and concise syntax. Now I use htmx more than jQuery.

Re: Ask HN: I'm curious to know why should we use jQuery now?

#5
You probably should not use jQuery unless you have an actual need for it. 10-ish years ago it was helpful because browser features were very fragmented at the time and it was hard to write code that would correctly function across all major browsers. Today, there's little difference (mostly due to them all being the same under-the-hood nowadays) so instead of being a helpful tool, it's being overused for numerous reasons. Most of what jQuery was really good at has now been added to Javascript core or there is a browser API for it.

Re: Ask HN: I'm curious to know why should we use jQuery now?

#6
I'm using Unpoly (https://unpoly.com) instead of htmx. One thing that, sometimes, makes me consider pairing it with jQuery are the components built around it.

Stuff like datepickers, autocompletes and whatnot are very consolidated in jQuery world. Sure there are options for vanilla JS but they are not mantained or do not have all the features.

These components are being built for the Reacts and Vues frameworks these days.

Re: Ask HN: I'm curious to know why should we use jQuery now?

#7

I'm using Unpoly ( https://unpoly.com ) instead of htmx. One thing that, sometimes, makes me consider pairing it with jQuery are the components built around it. Stuff like datepickers, autocompletes and whatnot are very consolidated in jQuery world. Sure there are options for vanilla JS but they are not mantained or do not have all the features. These components are being built for the Reacts and Vues frameworks thes…

Yep, plugins in JQuery world are really consolidated and mature

Re: Ask HN: I'm curious to know why should we use jQuery now?

#8
post #2

I use it purely for the syntactic sugar. It's less characters to type than vanilla JS[0]. I've toyed with Cash[1] too which I use for small projects that don't need the entire jQuery lib. [0] https://youmightnotneedjquery.com/ [1] https://kenwheeler.github.io/cash/

Hmmmm Nice resources, thanks

Re: Ask HN: I'm curious to know why should we use jQuery now?

#9
post #5

You probably should not use jQuery unless you have an actual need for it. 10-ish years ago it was helpful because browser features were very fragmented at the time and it was hard to write code that would correctly function across all major browsers. Today, there's little difference (mostly due to them all being the same under-the-hood nowadays) so instead of being a helpful tool, it's being overused for numerous rea…

But if I work on legacy projects, I have to know JQuery

Re: Ask HN: I'm curious to know why should we use jQuery now?

#10
post #4

Mainly because so much jQuery already out there. For a fresh project it's harder to make an argument for it, but if you work with legacy code you probably have to know jQuery. Personally I like jQuery. Like so many developers I started using it a long time ago because it solved numerous browser inconsistencies and incompatibilities. Then I got used to the clean and concise syntax. Now I use htmx more than jQuery.

For fresh project, maybe it's better to use a modern tool
Post reply on HN