3 ms·
My $0.02 React is a rendering engine, it's covers the final piece of your web app (rendering a data structure into DOM). But whatever you do to create the data
by AlwaysBCoding 11y ago
My $0.02
React is a rendering engine, it's covers the final piece of your web app (rendering a data structure into DOM). But whatever you do to create the data structure that gets passed to React is up to you. This keeps most of your domain logic outside the context of the React framework, you just use React as a tool to render you final data structures into DOM. So basically the API you need to know for your domain logic is just Javascript, which most people know already and it's really easy to lookup answers to your questions etc...
With Angular your domain logic exists inside the context of the framework. i.e. if you ng-repeat something you can't just filter that collection with Javascript you have to use an ng-filter to do it which is a special Angular construct. So the API you have to learn to manipulate data isn't just Javascript it's Angular-specific. And what if you don't know how ng-filter works? Well, you're tied to the Angular docs to figure it out. The Angular docs are of particularly poor quality so this coupling turns into a really serious problem if you're trying to be productive, because you're constantly reading docs to figure out how you do something in Angular.
I'm not sure how Angular2 is since I haven't used it, but to me React vs. Angular1 is a no-brainer win for React, since it's much easier to be productive in React + you can target mobile now with React Native. Something I've noticed also, there are basically no developers who have switched from React to Angular and now evangelize Angular, yet there are thousands of people who have switched from Angular to React and now evangelize React. I think that speaks for itself in the sense that anyone who has used both extensively prefers to use React.