Earlier quoted context omitted.
If you use createElement, appendChild, and innerHTML, you can replicate a lot of the functionality of react. In fact react probably uses a lot of that under the hood. Of course for more complex applications, react is cleaner. But for relatively simple components, manually manipulating the DOM like this might be worth skipping the overhead of react.
Yep, agree entirely, although I wouldn't advocate mixing the two in a single application--mixing mechanisms is added cognitive overhead. But again, JS is just a language, that happens to have an interface into a DOM (in some environments). It's not a framework that guides you in how to organize and architect an app. It's possible to write maintainable, high-performance, complex apps using plain JS. Adding a few simpl…
React is mostly hype
51–60 of 138 posts
Re: React is mostly hype
#52I want to downvote you as I dont agree with you, but unfortunately I can't.
I suggest replying with counterarguments, that will work much better than downvoting as I can clarify eventual misunderstandings.
HN is worse than reddit already.
Re: React is mostly hype
#53If true, then what is a competing JS DOM renderer with same or nearly same DOM rendering speed? Closest I've found is Vue but it was still 20-30% slower than React, according to the DOM speed test on a benchmarking site.
edit: developed and backed by the awesome guys at The Guardian newspaper.
Re: React is mostly hype
#54Earlier quoted context omitted.
React itself is pretty simple and very nice to work with. The whole react/redux/react-redux/react-router/react-router-redux/webpack/babel/flow agglomeration on the other hand is a lot more complex and subject to a lot of api churn. But you can actually get pretty far just using React by itself. Don't adopt other parts of this stack until you actually really need them and you can go pretty far with just a few concepts…
Why not take your comment a step further? That is, you can get pretty far using plain js `createElement` and similar functions. In fact I've created a fairly complex SPA without using any external libraries. Don't use react until you absolutely need it! Back in the day, jQuery was amazing because it made selecting and manipulating DOM elements easy. But now, plain JS has mostly caught up to that functionality, to the…
Before with libraries like jQuery every potential action had to perform it's own UI modifications.
As the projects grows you have the same UI element being controlled from many different sections of code. States and state transitions not clearly defined.
With React you set the state and the UI will always match, no matter how the current state was achieved.
The purpose was to get rid of ad-hoc DOM manipulations.
The Flux architecture just takes this a bit further by formally defining who holds onto the state/how it's accessed (stores) and the availible possible state changes (actions).
Re: React is mostly hype
#55Earlier quoted context omitted.
Yep, agree entirely, although I wouldn't advocate mixing the two in a single application--mixing mechanisms is added cognitive overhead. But again, JS is just a language, that happens to have an interface into a DOM (in some environments). It's not a framework that guides you in how to organize and architect an app. It's possible to write maintainable, high-performance, complex apps using plain JS. Adding a few simpl…
Well then to return to your original point that redux/webpage/flux/blahblah are overkill and you shouldn't use them until you need them, you can make the same argument. They are more layers that guide you in " how to organize and architect an app." The tradeoff is that you get simpler code in exchange for more architectural overhead and a more complex build process.
For an app of any reasonable complexity you'll have "architectural overhead" whether or not you're using your architecture or someone else's. That's just a given. (And if you don't, you have more overhead trying to figure out what you were doing.)
More complex build process? Yep, if you're not writing all the code yourself, and you want to distribute a single file, and ES2015 (or other) transpilation, and minification, sure. But you can use all the libraries in question without much of a build process at all, just load 'em all up and use ES5.
Complex build processes are a result of wanting to distribute and write code in a certain way. They're not a requirement.
Re: React is mostly hype
#56The arguments are pretty vague, for example > React becomes counterproductive when developing apps that aren't mere demos. I have developed big apps in Backbone, moving very the same apps to React and the productivity went up madly. Facebook does develop apps which certainly cannot be considered "mere demos" and you can see them in action, for example Ad Manager for Facebook on iOS (written in React Native). Facebook…
Well, React has one huge disadvantage: It requires you not suing FB, even if they abuse some of your own patents. That patent license they have in their project basically means you can only use React as dev in a company if your company does not have patents or noteworthy IP.
https://mobile.twitter.com/paul_irish/status/754864479460929...
Re: React is mostly hype
#57Earlier quoted context omitted.
Why not take your comment a step further? That is, you can get pretty far using plain js `createElement` and similar functions. In fact I've created a fairly complex SPA without using any external libraries. Don't use react until you absolutely need it! Back in the day, jQuery was amazing because it made selecting and manipulating DOM elements easy. But now, plain JS has mostly caught up to that functionality, to the…
This was one of the _problems_ React solves. Before with libraries like jQuery every potential action had to perform it's own UI modifications. As the projects grows you have the same UI element being controlled from many different sections of code. States and state transitions not clearly defined. With React you set the state and the UI will always match, no matter how the current state was achieved. The purpose was…
Re: React is mostly hype
#58The arguments are pretty vague, for example > React becomes counterproductive when developing apps that aren't mere demos. I have developed big apps in Backbone, moving very the same apps to React and the productivity went up madly. Facebook does develop apps which certainly cannot be considered "mere demos" and you can see them in action, for example Ad Manager for Facebook on iOS (written in React Native). Facebook…
I also just don't understand statements like these. React is used by very smart engineers at Netflix, Uber, Lyft, Airbnb, etc and a ton of startups. It's well documented by these people that using React has been a productivity boost and they love it.
I know "argument by authority" but come on, you can't just say "React is bad for real apps!!!" when this list[1] exists.
[1] https://github.com/facebook/react/wiki/Sites-Using-React
Re: React is mostly hype
#59The arguments are pretty vague, for example > React becomes counterproductive when developing apps that aren't mere demos. I have developed big apps in Backbone, moving very the same apps to React and the productivity went up madly. Facebook does develop apps which certainly cannot be considered "mere demos" and you can see them in action, for example Ad Manager for Facebook on iOS (written in React Native). Facebook…
Well, React has one huge disadvantage: It requires you not suing FB, even if they abuse some of your own patents. That patent license they have in their project basically means you can only use React as dev in a company if your company does not have patents or noteworthy IP.
Here is the relevant section from the PATENTS file:
if Facebook or any of its subsidiaries or corporate affiliates files a lawsuit alleging patent infringement against you in the first instance, and you respond by filing a patent infringement counterclaim in that lawsuit against that party that is unrelated to the Software, the license granted hereunder will not terminated under section (i) of this paragraph due to such counterclaim.
It is an opinion held by many (many here) that Software Patents bring no value to the community and need to be abolished. I agree with them, and hence I disagree with you. I did not down vote you.
Re: React is mostly hype
#60I really don't give a shit what anyone says, for me personally ReactJS makes front end great fun to program and an absolute blast and empowers me like never before to build powerful, interactive front end apps with a code base that is well structured, understandable and makes sense. Until React I dreaded front end development, painful, weird, quirky, hard to organise and generally problemtic. With React I feel like a…
Even more than with React, because they both felt much more full featured.
But yes they were harder to grasp than React and I prefer the tiny API of React over that convult that ExtJS is. And yes, I prefer JS-as-templates over that whole HTMLBars stuff Ember throws at their devs.