4 ms·
If that's all you ever need to do, then sure. Not everyone has that choice, though. I've needed to build rich, complex UIs under a deadline, and React has made
by midgetjones 10y ago
If that's all you ever need to do, then sure. Not everyone has that choice, though.
I've needed to build rich, complex UIs under a deadline, and React has made that way easier and more maintainable than if I'd done it the old way.
- lj3 10y ago> and more maintainable React hasn't been around long enough to make that claim. Angular 1.X has and, imho, it's no more maintainable than your typical jquery program. I suspect we'll find the same thing is true with react in another 3-5 years.
- RussianCow 10y agoI don't think that's true. Angular isn't very maintainable because its architecture encourages you to write spaghetti code with implicit dependencies. React, on the other hand, encourages a much more explicit data flow, so I would guess that React apps, all else being equal, are much more maintainable than Angular apps. (Standard disclaimer about how you can write maintainable code in any framework and this isn't necessarily a rule.)
- renke1 10y agoTo be fair, you should compare React+<state management library/framework> with Angular because a lot of complexity in the frontend comes from dealing with state. Sure, you can just use setState and go with React only, but not many people do that (for a reason).
- beaconstudios 10y agoI think people just implicitly mean React+Redux in these cases.
- RussianCow 10y agoThat's true, but even only using setState and props, the data flow in React is much more explicit than that of Angular. My point was that React encourages more maintainable code by default, even without other libraries.
- beaconstudios 10y agoangular, in my opinion, is pretty horrible from the get-go. It seems to want to proxy logical routes via the DOM rather than have the DOM be the result of the logic.
- midgetjones 10y agoFour years isn't enough? I'll be honest, I'm not sure what longevity has to do with maintainability. I'm sure it's totally possible to write unmaintainable rubbish in React, just as it is in any language/framework/library, but I found it much easier to write idiomatic, maintainable code than the wild west of jQuery.