Adresează întrebări și învață de la freelanceri experți
This is an interesting question and does not have a straight answer.
Usually React.js should be used on websites where changing DOM elements is done frequently and performance is needed. ReactJS has better performance than Angular 1.X, BUT Angular 2 has almost the same performance as ReactJS.
Both Angular and React has great community support. React has gained more traction in the last months, while Angular was the JS UI framework for a couple of years. Now if you look at the usage there are more websites using Angular than React, but this may change.
If you want to start to learn, I would go with Angular2 first then start learning React.js. Based on my experience the learning curve for React.js is a little steeper than for Angular.
While the differences between Angular JS and React JS are large, they can both accomplish the same thing. If I appear biased in what I've written here, it's because I'm biased, definitely toward React. Angular is a much fuller featured framework than React, which isn't really a framework at all, but that doesn't mean a lot when I don't see the need for most of the features that Angular provides. I've found that I have to write less code to do more in React, and React has better performance than Angular due to React's implementation of a virtual DOM (which I'll prove in a future post). Despite that, support for Angular is much, much better, with a larger community and following, as React is just getting started.1 aprecieri
Contrary to popular opinion on the subject, I think Angular 2 is faster to learn when compared to React for the same goals, simply because you are making fewer "first-time-learner or developer" decisions along your journey.
Angular2 and TypeScript are opinionated,
Most documentation is "single version of truth" from one source (Google, the authors of Angular and Microsoft, the authors of TypeScript),
There is mostly "one Angular/TypeScript way" of doing things, so fewer decisions to make along your learning and development journey,
Angular 2 API and TypeScript language are well documented.
Official samples are up to date with latest changes in the API, well mostly.
Development boilerplates or starters are fairly mature, some like Angular Universal are backed by Google/Angular core team.
The development and build tool-chain is mostly addressed by Angular/TypeScript, and few popular starter projects.
React can in fact be used with Angular as React is but the view (as clearly stated in their docs).
Whether to use the Flux architecture or Angular (which is an 'Heroic MVC' framework) is a better question.
Ask me a thousand times what to use for your next JS app and I'll always give you the same answer. CycleJS. Its simple, functional approach makes it hard to introduce bugs into your apps, and its foundations are pretty strong. Once you get used to it you'll ask yourself "Why not use CycleJS?" - You can use React in Cycle too. It is based on Observables, the same as Redux (which is used in conjuction with React as a flux architecture of sorts - better IMHO).