DEV Community

Discussion on: Don't believe the hype.

Collapse
 
siimsoni profile image
Kristjan Siimson • Edited

There is no need for a complex SPA application written in React/Angular/Vue installing 37 dependencies to make an http request, or fill a simple form.

... few paragraphs later...

Sometimes a few lines of JQuery can do everything you need

TBH, jQuery is even worse than React. jQuery 2.1.3 minified is 84 kB. Preact is a lightweight alternative to React at only 3 kB. Sure, you create simple interactions with vanilla JS (or complex if feeling masochistic), but what do you need jQuery for in 2020? It's just a whole lot of bloat we needed because it gave some degree of compatibility with IE 6.

At end of the day, just use what works for you.

Collapse
 
chris_bertrand profile image
Chris Bertrand

jQuery might be 84kb but how big is the bundle with all the dependencies in the complete React app? Sure Preact is a good alternative, but so is Vanilla JavaScript. I'm not advising people to use jQuery, far from it. At the end of the day, it's all the same code. Use whatever you want, dont pick one because it's cool. It sounds like you're aware of this already. Not everyone is. Thanks for the healthy debate!

Collapse
 
randalvance profile image
Randal Vance Cunanan • Edited

jQuery was also a hype back in 2000's. React is almost a decade old now, and I will no longer call it a hype.

I do understand the use of jQuery for legacy projects, if it aint broke, don't replace it.
But, when I see someone use jQuery to build a new project in 2020, I just see it as a refusal to learn a superior modern technology. There's just no excuse for it. It's the same reason new houses and buildings are built using new practices, while old houses are just maintained.

Thread Thread
 
chris_bertrand profile image
Chris Bertrand

Everything is new and shiny at one point! 💍🏚️🚀

Collapse
 
siimsoni profile image
Kristjan Siimson

The dependency hell is not something forced upon you when use React, it's something that many React users have inflicted on themselves by not being careful what dependencies they introduce to their application. That comes from another hype that everything should be reusable, and the belief that if you copy paste two lines you will lose your limbs or something. 😁