You also left out the most important point - Angular is a framework, and with any framework almost everything is done "their way or the highway" (or at least, their way or you're off in the weeds of unsupported/second-class-citizen workflows with limited support and documentation).
React is a library, and - like any other library - if necessary you can swap it in and out for alternatives without completely reengineering your entire application.
Frameworks are convenient but fundamentally limiting because they dictate the structure of your application, so you're always trying to express both the problem and the solution in terms of one specific tool. With a full toolbox you can hammer nails, screw in screws and spread glue as appropriate. With exactly one tool in your toolbox you either severely limit the kinds of projects you can undertake or you inevitably end up banging in screws sooner or later because that's all you can do.
Composing libraries together takes more effort, but gives you more flexibility, allows you to avoid lockin more easily, and allows you to express your solution in terms of the problem-space instead of coercing you into a "one size fits all" approach that never really quite does.
React is beautiful.. in principle, but to actually do useful things with it you need so many additional libraries that the slickness is lost. You want ajax? You need an additional library. You want promises? You need an additional library. You want routing? You need an additional library. And god forbid something goes wrong and you have to trace through the documentation of each of these libraries and how they work with react proper.
In theory, sure I could pull out react and replace it with some other view engine, but in reality I'd be pulling out react and all the other react-based libraries and replacing/adjusting all of those.
Angular 1.x sure isn't perfect, but at least all the most basic tools you need for a web application are right there and I never have to worry about how $http works with $scope or whether $q is a compatible version.
in principle, but to actually do useful things with it you need so many additional
This is actually a benefit. You are looking for an opinionated Swiss army knife. With React, you do things what makes sense to you, not what the framework forces you to do.
Angular does not recommend many vanilla js aspects, but does not "force" you not to apply them, it's still javascript and you're able to do whatever you want to do within the language's bounds, even if that means (for example) accessing and handling DOM inside a controller.
This is actually a benefit. You are looking for an opinionated Swiss army knife. With React, you do things what makes sense to you, not what the framework forces you to do.
In Angular 2 most features are implemented deep in the compiler. For instance, I wanted to compose their @Input decorator to create an @ObservableInput decorator that would create a stream for me, but you can't because their decorators just add metadata that is specifically for the internals of the compiler. Not extensible, so good luck if you hit a point where they haven't thought of your use case.
Well, he's right in a way because technically you can certainly mix Angular with vanilla Javascript/jQuery, but you have to set up a whole host of watchers and scope updates manually to notify Angular of any changes that happen from outside of Angular.
I've had to do that when I integrate SignalR into an Angular app, and it's kinda a nuisance every time. It works, but it's not really very elegant.
21
u/Shaper_pmp Sep 15 '16 edited Sep 15 '16
You also left out the most important point - Angular is a framework, and with any framework almost everything is done "their way or the highway" (or at least, their way or you're off in the weeds of unsupported/second-class-citizen workflows with limited support and documentation).
React is a library, and - like any other library - if necessary you can swap it in and out for alternatives without completely reengineering your entire application.
Frameworks are convenient but fundamentally limiting because they dictate the structure of your application, so you're always trying to express both the problem and the solution in terms of one specific tool. With a full toolbox you can hammer nails, screw in screws and spread glue as appropriate. With exactly one tool in your toolbox you either severely limit the kinds of projects you can undertake or you inevitably end up banging in screws sooner or later because that's all you can do.
Composing libraries together takes more effort, but gives you more flexibility, allows you to avoid lockin more easily, and allows you to express your solution in terms of the problem-space instead of coercing you into a "one size fits all" approach that never really quite does.