top | item 17794624

(no title)

waveforms | 7 years ago

According to this website [1] jQuery is still used by over 70% of websites. I have built production sites in extjs, Dojo, Angular, React etc. but nothing beats the fun of throwing up a quick website in jQuery and Bootstrap. Its even more fun with es6 now! I am looking forward to where jQuery and other DOM manipulation libraries go in the future. [1] https://w3techs.com/technologies/details/js-jquery/all/all

discuss

order

Secretmapper|7 years ago

Spot on! I'm a ReactJS developer by trade, but when doing side projects, I still use jQuery from time to time, especially if the client is not that state-heavy. I know I can make do with fetch, querySelector/All and the like, but I'd rather take the convenience.

Related: https://robots.thoughtbot.com/how-we-replaced-react-with-pho...

franciscop|7 years ago

Yep, exactly. I use Umbrella JS (author here!) for most side projects. I only reach for React for SPA and state-heavy projects. These cases with jQuery (or Umbrella JS) is tricky because while you can do it with template strings, you don't get the modularity, build tools and it's difficult to protect against XSS.

You have to be very, very careful with .html(...) and only for that reason sometimes React is worth it, specially with SPA. But for small-to-mid sizes projects, Umbrella JS FTW!

ttty|7 years ago

It's interesting, I couldn't write jquery website anymore, even if simple, they become more complex so quickly. Add this feature...

Sidenote: Anyway in my brain jquery/templates never made sense. I always wanted components, pass some arguments and get the component, self contained.

alangpierce|7 years ago

Just to balance the "70% of websites" number, I've worked on a number of websites where there was still some legacy jQuery floating around, but where all new development is expected to happen in a modern framework like React, and new code using jQuery would be unlikely to pass code review. Or, perhaps, where jQuery is legitimately used as part of the occasional escape hatch when you can't use React for some technical reason, but is discouraged and only used with careful scrutiny.

I suspect that if you refined it to "How many new websites in the last year use jQuery as their primary UI library?", the number would be much lower.

the_duke|7 years ago

But why do you need jQuery for that? Browser APIs have gotten good enough that jQuery is not really needed anymore, imo.