r/javascript • u/[deleted] • May 15 '16
Is React the new jQuery?
https://medium.com/outsystems-engineering/react-is-the-new-jquery-64ae6d468358#.5wfm7uriq2
u/voidvector May 15 '16
Is JavaScript the new Java? Is functional programming the new OOP? Is unidirectional the new MVC?
I can go all day long
1
u/ishmal May 17 '16 edited May 17 '16
Vodka makes me feel brilliant. Doesn't make it so.
I think Angular's problems stem from the fact that the current dev cycle has taken far too long, and is less evolutionary and more of a moonshot. It was a big, risky wager. But I think that now it's finally at RCx, it has reached the point where it can be regarded as minimalist, too.
An angular 2.x app can be coded as something that is a small fraction of what it would take in 1.x.
Just wanted to get that in. I like React, too.
0
u/Thunder_Cats_Hoe May 15 '16
I would say component based frameworks are the new jQuery. React, Angular2, Vuejs, etc are fantastic frameworks based on components.
2
0
May 15 '16
[deleted]
-5
u/everdimension May 15 '16
most small/medium business sites simply don't need a client-side MVC or framework
Very disputable.
1
u/everdimension May 15 '16
So I guess clarification is implied :)
If you start bringing any logic at all to your client side, you'd better make it structured. Otherwise you're saying "This website will never grow to need a complex client-side interface, and I'm making damn sure it'll never scale by refusing to bring any structure".
"jQuery vs react" is of course a meaningless comparison, but that doesn't mean one cannot be used in place of another. JQuery is imperative, react is declarative.
If you start bringing any logic at all to your client side, you'd better make it clear and maintainable. You like jQuery and know how to write good and clear code with it? Great! Use jQuery. Just don't say that "this website doesn't need react because, well, it's react, and it sure needs jQuery, because, well, everyone surely needs jQuery". And keep in mind that jquery is not that lightweight either. Abovementioned
vue.jsis only 74.5 KB, while compressed, production jQuery is 83 KB.0
May 15 '16
[deleted]
1
u/everdimension May 15 '16
Alright, with this I agree. Still, jquery gets rid of lots of inconsistencies even nowadays. But using no DOM library has become accepted, indeed.
The decision that is left is whether one wished to bring declarative UI handling to the app. In that view libraries like react and vue can still be a good idea even for websites with little client side logic.
0
May 15 '16
[deleted]
6
u/sorrynin May 15 '16 edited May 15 '16
I loved jQuery, then I loved React for a moment, now I love Mithril. Vue 2nd
I don't think the JS community is going to form a single favorite honestly. There's too many frameworks and libraries that work their magic for each case. I don't know what's the deal with React, the patent literally scares me (in combination with all this hype).
3
u/chrisvfritz May 15 '16 edited May 15 '16
Vue is like jQuery in the sense that it's ridiculously easy to get started and be productive. Just like jQuery, you can just drop it in from a CDN and build something. React doesn't scale down nearly as nicely. In fact, the closest thing to jQuery-like simplicity in React isn't even recommended for production.
But Vue also scales up better than React in my opinion. If you want in-browser devtools, hot module reloading, lint-on-save, CSS extraction, and so many other features of the ideal development environment in 2016, it takes a few minutes to set up (and most of that is waiting for npm install to finish). Even for members of the React core team, it takes an entire evening to set up a new project.
React also leaves so much to user land. Need a great solution for ajax, routing, state management, animation, or any number of really common UI problems? The React core team offers nothing here, so time to stop building things and start hours of research, digging through hundreds of 3rd party libraries that hopefully won't soon be abandoned by the author.
Vue remains modular like React, but is also dedicated to maintaining officially supported companion projects to solve these common problems, providing an obvious solution that consolidates best practices. This means you can stay focused on just building your app, which is what we all want, right?
4
May 15 '16
[removed] — view removed comment
1
May 15 '16
Dough :). Guilty as charged. And I even knew about that law beforehand (had read about it in John Gruber). I think I was just trying to make the title a bit less controversial by putting it in a question form. That should teach me.
2
u/[deleted] May 15 '16
No. React is an opinionated view framework. jQuery is a library of utility functions. es6 is making utility libs like jQuery and lodash unnecessary.