top | item 37145486

(no title)

rodorgas | 2 years ago

JQuery would make sense when we didn’t have querySelector and fetch API. I can’t think of any reason to use it today on a new project, there are not advantages over vanilla.

discuss

order

tambourine_man|2 years ago

The native API is much more verbose and less composable. It was a real lost opportunity.

antiatheist|2 years ago

  const $ = document.querySelector.bind(document)
  const $$ = document.querySelectorAll.bind(document)

synergy20|2 years ago

jQuery's syntax is 10x better than vanilla javascript

antiatheist|2 years ago

Bullshit, the jQuery "Ajax" API is a hellish convoluted nightmare with zero consistency.

https://api.jquery.com/category/ajax/

Have you seriously looked at this and thought "yeah thats better than using a single native function (fetch)"?

As for the rest of the API - what would you even use besides the css and selector functions? Which again, the native `classList` and a simple bind to the selectors are simpler and less verbose.