7 ms·
The arguments are pretty vague, for example > React becomes counterproductive when developing apps that aren't mere demos. I have developed big apps in Backbo
by methyl 10y ago
The 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 invests a lot in React development and there is a reason for that - they use it internally intensively.
> It's marketed to developers by billion dollar Facebook, a company historically intent on squashing startups.
This is not an argument at all. I would be really surprised that's the reason for React to exist. Also React is more a way of thinking, the library itself can be replaced if Facebook should enforce it on a successful startup.
> The utility gained by using React's ecosystem is significantly outweighed by its overhead.
This is certainly not my experience. React has very little overhead and from my experience it's pretty easy to grasp the concept for new developers.
I have no idea where does hate for React come from, it's >> just << an open source library and I wonder how people are willing to start flamewars about a few lines of code. If you don't like React, don't use it. There are a few alternatives like Ember, Angular or even Backbone (although I would say Backbone deserves much more hate than React).
- cageface 10y agoReact 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. And yes, React is as much a technique for building UI as it is a particular implementation. Learning and using React has also improved the iOS code I write.
- liamzebedee 10y agoFully-agree. From the start, Netflix was talking about React being useful because you can drop it in to various pages without affecting other UI views. I use it at work on a page-by-page basis-- it drastically reduces the mental overhead of class naming, JQuery spaghetti, maintaining the DOM etc. Sometimes I even surprise myself when something "just works" because of React's well-controlled model.
- rubber_duck 10y ago>Fully-agree. From the start, Netflix was talking about React being useful because you can drop it in to various pages without affecting other UI views. This is Reacts greatest strength and a huge design constraint they had from day one. On the other hand it's a tradeoff and as everyone mentioned not having the whole stack under "one roof" brings a lot of tedious crap. If you need something to incrementally rewrite parts of your frontend React would probably the best choice. If you need something to start your project on I'd consider other options, Angular 2 and Aurelia for example.
- chatmasta 10y agoWhy 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 point that it rarely makes sense to use jQuery over plain JS. I wonder if in a few years the same will be true of much of the functionality in react.
- davelnewton 10y agoNo, because "plain JS" isn't a UI framework. We're moving closer to having real GUIs in the browser (e.g., Java Swing) but that's not a function of the language, but the plumbing around the language. Swing isn't Java, Swing is written in Java.
- chatmasta 10y agoIf 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.
- davelnewton 10y agoYep, 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 simple layers makes it a lot easier, though, and I'd argue that the current crop of client-side frameworks make it easier still. Simple apps == simple code. Complex apps == complex code, regardless of the tools used to create it. Underneath everything, after all, is still just plain JS.
- vbezhenar 10y ago> 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. Redux is very core concept. You'll have to rewrite half of an application, unless you use it from the start. Routing is essential for any serious web site, so you have to implement it one way or another, and not using working libraries looks strange. Same about babel — either use it from the start or rewrite half of code later (or have a mess). Also I think that babel currently the way to process JSX, so unless you avoiding JSX (which would be very strange), you have to use it anyway. I don't agree, that you can avoid all this stuff, unless you are just learning on throwaway pet projects or willing to reimplement a lot of things which are already have good enough implementation.
- brightball 10y agoI'd tend to agree with the parent here. Then appeal of React is that it's one piece where everyone else is trying to develop a full stack. Your needs for that single piece will be more consistent across projects that are either legacy or new. A full frontend stack is total overkill for the vast majority of projects that fall under the "open, check, close" use case. So many of the perks of those frontend stacks, such as keeping data in the browser and only reloading certain parts are based on the slow load times of a full frontend stack if you don't do all of those things. Being able to use pure React both client and server side without anything else is a fairly significant perk.
- cel1ne 10y agoWhat I need in every project is react for the UI, babel for modern JS and webpack. (I went through combinations of gulp, browserify, requirejs and brunch. Webpack finally solved the packaging-mess for me). Redux is something you can implement yourself easily, I never understood the need for a library there. The good idea of redux is to have a serialisable state which is changed through events. This gives you unidirectional data-flow and the ability to pause/restore your application. Complete immutability and funneling everything through functions on the other hand often just obscures readability, and, in case you are using immutablejs, gives you terrible performance. If I want to have purely functional programs I don't use Javascript, but Haskell or something. If I need time-travelling debugging, which I never found very useful when dealing with complex states, I'll implement it by copying my state using serialization.
- lcarlson 10y agoJust use mvc, page js and fetch: github.com/lancecarlson/React-MVC
- arnorhs 10y ago> I have no idea where does hate for React come from, it's >> just << an open source library I think most developers (at least seasoned ones), come to appreciate tools as a solution to the problems that they solve. There's always going to be a vocal minority that is strongly against whatever has the most hype at any given moment. Their reasoning is probably as varied as the people themselves, and a some of the criticism may be valid, but this is the nature of developer culture. Having both groups is probably a net positive.
- kuschku 10y agoWell, 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.
- sotojuan 10y agoNot true any more: https://mobile.twitter.com/paul_irish/status/754864479460929536 https://mobile.twitter.com/paul_irish/status/754864479460929...
- kuschku 10y agoThat makes things a lot easier indeed.
- jeswin 10y agoThe important point is, you don't lose FB's license grant if you counter sue them. You lose the grant only if you initiate a lawsuit. 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.
- liorix 10y agoI guess it's possible to replace react with preactjs.com with a little amount of effort.. In cases where the legal aspect prevents you from suing FB..
- sotojuan 10y ago> React becomes counterproductive when developing apps that aren't mere demos. 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 https://github.com/facebook/react/wiki/Sites-Using-React