Re:jQuery v4.0 Beta
by erhaetherth on Tuesday February 06, 2024 @11:02PM
(#39284349)
If you don't want to use a big framework, then you needn't use any library at all. Nearly everything in jQuery is 1 line of modern JS, no?
[ Parent
| on HN ]
One line of jQuery can replace many lines of vanilla js.
Re:jQuery v4.0 Beta
by colordrops on Tuesday February 06, 2024 @11:23PM
(#39284474)
Yes, there isn't much reason to use jQuery these days other than keeping with the idioms of a legacy system.
Nearly everything in jQuery is more concise, consistent and composable compared to modern JS APIs. As this site clearly shows: https://youmightnotneedjquery.com/
> Nearly everything in jQuery is 1 line of modern JS, no?
Since JavaScript never actually requires line breaks, yes.
Otherwise, absolutely not. Modern web APIs remain highly statements-based, with little affordance for pipelining / cascading.