DEV Community

Discussion on: Who still regularly uses jQuery?

Collapse
 
bigbott profile image
bigbott • Edited

I don't see any valid reason to not use jQuery.
The point of jQuery is not ajax or cross-browsing. The point of jQuery is simplicity and concise readable code. Every method in jQuery returns a jQuery object therefore the method chaining is possible. You cannot write such a code in pure JavaScript.

Also, jQuery has 30,000 (according to Github) plugins. Some of them are super popular. For example, Select2 alone used in almost 3% of all websites. It 10 times more than Angular. Can you write such a thing in pure JavaScript? I am sure you can, but it will take you weeks if not months.

Size (27kb gzipped) can matter for about 0.00001% of projects. If it really matters don't use it but don't use React as well otherwise it doesn't make any sense.

SPA (React, Angular, Vue) are not suitable for projects that require indexing by search engines. Old style multiple page jQuery featured website is a better choice for such projects.

But jQuery with very little extra work can be used for creating SPA as well. I have written a very small (150 lines of code) SPA framework that makes routing and organizes code into logical modules, and use it for creating mobile and progressive web apps.

Actually, I don't see any reason to use any of the modern JS frameworks. They are too big, too complex, they mix html, css, js, they use impossible to debug bindings, and so on and so on.