10 ms·
I'm surprised to see Angular drop in ratings and rank so poorly compared to React. I personally prefer Angular myself because it's (a) opiniated and (b) has eve
by samspenc 7y ago
I'm surprised to see Angular drop in ratings and rank so poorly compared to React. I personally prefer Angular myself because it's (a) opiniated and (b) has everything included (HTTP REST calls, Material UI, etc). Just curious why so many people prefer React and mark it so positively.
- ggregoire 7y agoIt takes 1 afternoon to learn React and it never requires you to open the doc again. Angular, on the other hand...
- jamil7 7y agoUntil you need a router or state management ect, then you've got a few tabs of docs open and a case of anlysis paralisis and a bunch of glue code to write.
- Supermancho 7y ago> It takes 1 afternoon to learn React and it never requires you to open the doc again. You are confusing your imagination with reality (or the history of your own experience).
- 734129837261 7y agoAngular ng-is ng-very ng-opinionated and requires a ton of boilerplate knowledge. It requires typescript knowledge, and I've noticed that (finally!) a lot of developers are realising that typescript actually doesn't make life easier at all. React, on the other hand, is a very intuitive library instead of an all-encompassing framework. You can easily setup a React application in a few seconds and get started, adding whatever you want as you go. The JSX syntax is infinitely more intuitive compared to the Angular way of doing things. Which also gets me to the point of Angular having a specific way of doing things, "the Angular way". With React there's less thinking required to get things done. The learning curve is steep (as in: you pick up the knowledge quicker) because the amount of information to take in is relatively low. Angular takes months to master. It's very opinionated. And it requires typescript. I for one hate typescript with the passion of a thousand suns. I know it very well because I have to if I want to keep my job, but it's so freaking unnecessary...
- hackerbabz 7y agoWhy do you typescript so much?
- gherkinnn 7y agoWhat’s with all the TS hate?
- bakuninsbart 7y agoIn my experience, people who have been experts on JS before TypeScript became a thing hate it. - It doesn't give them any advantages, while severely limiting their options and workflow. For newer developers with background in other languages it is quite nice though.
- gherkinnn 7y agoI understand “limiting options and workflow” as “limiting the stupid amounts of yolo that JS allows”. TS shows you just how bad JS can be without very, very diligent processes to keep it in check.
- Bahamut 7y agoIt surprises me too personally - the testing experience is worlds better, better built in modules than what you get in the React ecosystem (especially routing, http request layer, forms, testing, etc.), and opinionation that helps improve the overall experience of working with it. I miss my time with Angular sometimes - my only gripes is TypeScript being limiting with regard to function composition, and creating a component in Angular requires quite a bit of boilerplate compared to React. To some degree, I feel there are a varying set of reasons why people have settled on React - some were never fans of AngularJS/Angular and some disliked how Google handled the migration story from AngularJS to Angular are probably the strongest reasons. TypeScript also not being terribly FP friendly is also a huge negative to some, whereas React enables more functional patterns overall. Some also dislike separate HTML templates vs. HTML in JS templating, some prefer to cobble together a bunch of small modules together, even if the modules are weaker on average. Ultimately, I think Google fell short on DX with the change over to Angular 2+ and the damage has lived on since, which is a shame because as a framework it was built really solid.
- jamil7 7y agoBasically this, I picked up angular 1 back in the day, for a while there was a lot of hype around it. The migration was very poorly handled and Angular 2 felt a bit alien when it was first released. React rose in popularity at exactly the right time and I think a lot of people felt a bit burnt by angular and didn't look back. Vue being released probably converted those still on the fence.
- nkingsy 7y agoIt’s just a bad framework for code reuse. -No dynamic directives -Nothing dynamic works with @ContentChildren, making anything that uses it the “last stop” for abstraction. -DI system makes inheritance/mixins nearly impossible, and without dynamic directives there are situations where the only solution is a massive copy paste job. I work in the framework every day and spend countless hours shaking my head at cryptic docs any time I try to do any type of abstraction.
- Bahamut 7y ago
- CrazyDave 7y agoI think the comments in this thread captures it pretty well. If someone doesn't see the benefits of typed languages, TypeScript will just be something that slows them down for no apparent reason. Same goes with RxJs, dependency injection, unit testing, and modules.
- verttii 7y agoBut Typescript is not a "typed language", rather a "language with types". Because of having to maintain JS compatibility it lacks the inherent type safety that other similar languages like Dart provide.
- fuzzy2 7y agoMaybe because React is small (API surface) and does (or is felt to do) “one thing”. It is easy to wrap your head around it, even without fully understanding, say, the Virtual DOM diffing. Angular is very different in that regard. I recently had to read up on how Angular applies changes to the DOM. It was extremely difficult to get this information at all. For me, React with TypeScript is king. It trumps Angular in three IMHO very critical points: * Typed “templates” (a tremendous help with IntelliSense, too) * No change detection magic (I firmly believe Zone.js is insane) * Build time
- buu700 7y ago* Angular templates are typed, but until version 9 (coming out in a couple weeks, but I've been using the RCs and they've been fine), any variable created in the template itself was defined as `any`, creating gaps in the compiler's coverage. A vscode plugin provides IntelliSense. * Agreed, this is an awful default and I don't understand why the Angular team hasn't already deprecated it. I suppose a slightly simpler "Hello World" makes Angular look a bit more approachable, but it just encourages accumulating unnecessary tech debt. The proper way to use Angular is to disable the magic (`OnPush` change detection) and use observables. * Prod builds take a while and use a lot of memory, but local development is fine. (I haven't observed that prod builds are necessarily "slow" relative to what they accomplish.) I like both Angular and React, but generally prefer Angular. The structure and universal consistency imposed by the framework and CLI are convenient (particularly when moving between projects or adding devs to an existing project), and the limitations imposed by Angular-HTML vs JS(X) are great for readability.
- tashoecraft 7y agoI think angular with zones will slowly start to fade away as the community moves more towards onPush components, with components hooks to trigger change detection. There is an ngrx proposal for a component that would handle this all nicely, but it's still only a proposal.
- fuzzy2 7y agoOn templates: Weeeell, no(-ish). Angular templates are text. They are checked during AOT compilation or otherwise at runtime (were most type information is gone already). And maybe at some other point I don’t know about. The Angular Language Service (which came very late) is a lot of help, if doesn’t fail to pick up component members yet again. I’m not sure whether it knows about types either. It also has problems with some complex use cases: for example, we have a derived `CdkTable` attribute, yet it doesn’t pick up its input properties. tl;dr: I don’t like text templates! I really like React “templates”! :D There’s also a minor annoyance: I’m not very fond of having the components as elements in the DOM. At least with modern browsers they behave predictably! On change detection: While `OnPush` is required for any sane application, you really need to fully disable Zone.js unless you want your application to re-render pointlessly. That could cause problems with third-party components I guess...? Either way, it’s really not as straightforward as it should be.
- codegladiator 7y agoI stay away from angular (I don't do react either, prefer vue as long as I have a choice) mainly because of major time I invested in angular 1 and then they completely ditched it and kept the same name.
- draw_down 7y agoI don’t know what Angular is currently like, but I worked on an Angular 1.x project and boy was it painful. So many concepts to learn just to make something simple, and the style of dependency injection was really awful (pass an array of strings that get automagically resolved, with implied suffixes, or maybe not but you won’t find out until you refresh and it doesn’t work!) I work in React these days, which is fine. But it doesn’t really attempt to solve all the same problems that Angular does. And thank goodness for that.
- codingdave 7y ago> Just curious why so many people prefer React and mark it so positively. For the exact same reasons you stated -- Angular is opinionated and has everything. React is just a framework - you get to make your own opinions and are not handed the whole ball of wax, so you can make your own choices.
- tashoecraft 7y agoWhen will this meme end. Angular is not crazy opinionated. The previous version more so, but it's really open to letting you do things in general ways. You want css scoped to your components? Sure. You want two way data binding? Sure, but wait you want one way binding? You go it. You can use rxjs, or you can avoid it. There's some general ways to set things up, but it's nice to have a general approach to each project you encounter. And the biggest thing is Angular wasn't designed to be used by a solo developer working on a side project. It's evolved to allow that, but it was designed with companies in mind. Multiple developers, multiple teams of developers, maybe with little communication to work together on single projects whilst allowing guide rails to keep things headed on the same track, but allowing many ways to move the track in a way that fits your style. The idea that react is just a "library" (think you mixed up your words there) is absurd when you look at the majority of react in the wild. Using create-react-app, react router, forms library, animations, etc etc, and now look, you just pieced together a bunch of different libraries to form....Angular.
- hateful 7y agoPersonally, I've switched from angular to vuejs after angular 2 (3, 4) came out. I found that vuejs was a better update from angular 1 than angular 2 was.
- LocalPCGuy 7y agoI also (as seen in at least one of your other responses) that people associate AngularJS and Angular when doing rankings in surveys like this one. There are many people who will never try Angular because of their experience with AngularJS. Also, this isn't a scientific random sample survey, it's people who self-selected to take it. And I think that Angular specifically suffers due to that because it is more likely to be used at enterprise or large companies where devs often tend not to follow Twitter/surveys/etc at least, not in the same numbers as some other groups. Just my opinion.