Hacker News new | comments | show | ask | jobs | submit login
Does anyone actually *like* React these days? (mobile.twitter.com)
22 points by diminish 8 days ago | hide | past | web | favorite | 14 comments

I dislike React these days. Parts of it are great. It still has the best ecosystem of all the JS frameworks and the virtual dom diffing is still the best in the business.

But, more and more, I'm having to adopt third party solutions to overcome the limitations of React. First it was Redux, because global state makes more sense than local state for anything non-trivial. Then it was Redux Router because control flow in React sucks. Then it was Sagas, because controlling side effects and limiting race conditions is crucial in a large React application (and, once again, control flow in react sucks). Now I'm adding in styled components because every other react styling solution I've seen has serious drawbacks and limitations.

Only after adding all of that do I feel like we're getting to the place React had intended when it was first released. Render functions are free of almost all logic. Everything is declarative and composable. Most of my components are now stateless, which makes everything so much simpler. Because of all of these additions, there's very little 'React' there anymore. I realized the other day that the more features of 'React' I jettison the happier I am with my applications.

But these are not problems with React. Sounds like you want a framework, not a library.

There is also the tooling behind react, that makes it hard to use in NON node environments.

Create react app is wonderful, but only if you're writing node backends.

Here is partial solution to this problem


(I created that)

> a certain barrier to entry because it needs JS knowledge

Maybe I'm missing some context, but what is this supposed to mean?

It means you'll need dedicated UI devs rather than have your backend/fullstack devs rotate into front-end roles, as Agile postulates.

Not if your backend is Node! :)

I love React. Especially when strictly sticking to stateless functional components. It's a truly elegant way to develop.

I like React.

React is the new Angular ("a next-gen UI layer") sucking just in a different way.

React is a UI layer, but Angular was a full-blown framework with routing, services to handle business logic, and so on.

"Sucking just in a different way" is reductive to the point of meaninglessness; For example, if I'm broke, life sucks in some ways, and if I'm a billionaire, life sucks in different ways, but still usually people clamor to be wealthier rather than poorer.

Angular's UI update mechanisms were(are?) miles worse than React. The prototype-based inherited scopes contained a ton of gotchas compared to React's prop-passing. The $watch mechanism inherently scaled poorly - changes were not localized and required going through all watchers! What's worse, the (primitive) mechanism to localize changes - local scope $digest, was essentially unused by the base framework and by pretty much any app developers(the documentation and the base directives would all use scope.$apply(), which caused a global digest, going through all watchers). There were several micro-DSLs that you had to learn in order to do iteration, filtering, sorting, etc. "Filtering" was a mess, leading to Ben Nadel's articles about it(e.g. https://www.bennadel.com/blog/2766-stateless-filters-don-t-a...). There are practically no lifecycle concepts that are exposed to the developer, leading to a lot of confusion on when a directive is instantiated and rendered, with a reliance on implementation details. Angular used a ton of confusing jargon - controllers(a directive provided by the framework), services/factories/providers(singletons with varying control over their instantiation), filters(actually formatters...), and so on. The name doesn't match what you would expect from it.

React improved on all of these things. While it has its own shortcomings(e.g. explicit passing of props leading to lots of boilerplate code), those exist for meaningful tradeoffs. This is why Vue and React are competing products, but they're both a massive step forward from Angular.

(Disclaimer: I haven't used "Angular", just AngularJS, but presumably calling React the new Angular means we're talking about AngularJS).

Can you elaborate on this? I've really only worked on my own React code or on code where I have a lot of control over quality, and have no idea how it's being used "in the wild" so to speak.

Yeah my comment was a bit trollish to get a discussion going. I actually prefer React over Angular, but React is overused a lot IMHO where a basic Ajax-y site would do and is much more adequate. Folks seem to over-engineer using React to pad their resumes.

Self promoters gonna self promote.

I don't like react, it's way too messy, it doesn't feel as well designed as other solutions. I walk away from job offers when they say "React", no matter how amazing the idea or job is, I just do not want to work in it.

Most of the time when a company says "We use React" it translates to "we rebuilt EVERYTHING in react, instead of going piece by piece."

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact