DEV Community

Leaving the Old Ways - jQuery vs React

Sasha Blagojevic on August 16, 2018

Contrary to popular belief, React’s biggest use cases are not SPAs, it’s the hybrid apps that are most common, and the best fit in my opinion, in ...
Collapse
 
jonrandy profile image
Jon Randy 🎖️

I've seen many, many projects where React has been used and it simply wasn't necessary - simple forms with a couple of buttons/controls, or simple websites with minimal functionality. The same thing could have been achieved with a mere fraction of the code using plain old vanilla JS.

This seems to be getting more and more prevalent these days. People are starting off with React and assuming it is the best way to do everything - it isn't.

Horses for courses - sure, it's the right tool for some projects, but in many cases it is simply overkill - over-engineering through ignorance

Collapse
 
blackcat_dev profile image
Sasha Blagojevic • Edited

Yep, I've seen people build blogs with server-side rendered React, that had no special JS effects or controls to warrant it, they made a full circle lol. They could have done the same with a couple of lines of PHP. Complexity for the sake of it! :D

Collapse
 
chartinger profile image
Christian Hartinger

Aside from pages where plain javascript is enough I would argue that vue.js in many cases would be an easier replacement for a jQuery app. No need for webpack, build chain and so on - just include it like jQuery and be able to use a modern (what ever that means) framework.

Collapse
 
jonrandy profile image
Jon Randy 🎖️

Yup. Riot.js is also a great option

Collapse
 
qm3ster profile image
Mihail Malo

Next thing, you're going to say you don't use React to generate static pages. -_-

Collapse
 
blackcat_dev profile image
Sasha Blagojevic

Vue is great as well, I haven't tried it personally, only glanced over it a bit, because React clicked with me so I stuck with it. For anyone looking to replace jQuery with Vue I highly recommend following @sarah_edo on twitter

Collapse
 
tux0r profile image
tux0r
Collapse
 
blackcat_dev profile image
Sasha Blagojevic • Edited

Yep, that one was a gem, you could say I'm a bit late to the game, I was kept in the back end dungeon for too long :D

Collapse
 
michaelrgalloway profile image
michaelrgalloway

React is becoming "the old way" already. Time for another blog post.