Hacker News new | ask | show | jobs
by rpwverheij 2771 days ago
as someone who tried Angular and was so relieved with the simplicity of React, I have no idea how they can come to that conclusion. But then again, I'm not very well know with the field of enterprise customers
2 comments

React requires too much FP concepts for the typical average enterprise developer.

It feels like doing Haskell with JavaScript.

You can write haskell style in any language. but you don’t have to.

function MyComponent(props) { return <p>Hello {props.name}</p> }

    import React from 'react';

    export default ({name}) => <p>Hello {name}</p>;
So much nicer than Angular.
> You can write haskell style in any language.

It would be great if that was true. The fact is that you can not copy Haskell in any mainstream language (Lisp gets the closest), and that hurts.

I dunno--most of what I end up doing has state, if not context. Not super Haskell-ish.
I've got the same feeling but with bad connotation.

React is easy the same way jQuery is. Easy, unstructured, foggy, too much permissive tool.

Far too easy to end-up with spaghetti-code.

I prefer not using it, Angular is far more organized.

Like another reply.

    // MyHello.jsx
    import React from 'react';

    export default ({name}) => <p>Hello {name}</p>;
Now do the same in Angular.
"Hello world!" programs or their slightly more sophisticated variation, the to-do list app, aren't a realistic measure when it comes to actual real-world software that has to solve real-world problems.
I cannot speak for GP but for me the complexity comes from stitching dozens of libraries to get similar "base" to build the app on. Ember/Angular have way more stuff baked in or standardized, while in React you have to handle ball of ever changing dependencies ... For seniors it's ok(-ish) tradeoff (you get much more choice / control), for juniors it is hell on earth.

But that is more of an issue for projects maintained for a long time. If you want to crank out small apps fast, your "example" is relevant, and React definitely is the better option.

What do you need that isn't in the box with React? Aside from fetch, which is in all modern browsers? The new Context component interface pretty much flushes out the last of what you are likely to need. As much so as what you get in the box with Angular. Even then, with Angular you'll usually need at least a visual component library, and with React, disparate components tend to work together with less friction comparatively.
Well if you focus on components only in your app then sure, not much needed. But complex apps need much more, like testing infrastructure, routing, data layer, service layer, tons of utility functions (last time I toyed with React it did not even have debounce ... Library for UI w/o it seems weird for me) and likely something else.

But hey, most apps are simple, so no need for all the above. I would say Ng/Ember are more specialized / niche.