Angular Vs React
Angular
Angular
- Is a full framework
- Has a Regular DOM, which renders updates slower than React’s Virtual DOM
- The rendered JavaScript and HTML maintains a physical separation
- Utilizes Components: emerging web components standard
- Data Binding: two-way
- You must use TypeScript. TypeScript is transpiled to javascript.
- Mobile: Ionic and Cordova are slower than React Native
- Testing: Jasmine & Mocha
- Learning Curve is higher, but once you understand it you have an entire MVC framework. But as application gets bigger, you have use to use 3rd party libraries for state management like Redux or Mobx. Angular scored more for OOP programmer
- Scalability: easy to scale
- Open source: GitHub stars: 40,963 / Contributors: 732 / Issue: 2,162
- Size: larger, resulting in longer load times and performance on mobile
react
react
- Just a small view library
- Has a Virtual DOM, which renders updates faster than Angular’s Regular DOM
- Uses JSX, which combines markup and logic in the same file
- Components: emerging web components standard
- Data Binding: one-way
- You Can use ES6/7 JavaScript, although you can use Typescript or Flow if you so choose
- Mobile: React Native is faster than Angular’s solutions
- Testing: Jest & Enzyme
- Learning Curve is lower, but you only get the view. Because of this, you’re going to have to learn a slew of 3rd party libraries. Ex. State management (Redux or MobX), Asynchronous calls (react-promise, react-thunk, or react-saga), etc.
- Scalability: easy to scale
- Open source: GitHub stars: 111,927 / Contributors: 1,242 / Issues: 287
- Size: smaller than Angular, so a bit faster and fast loading on mobile
React Fiber will increase the speed of React dramatically
Angular provides following “out of the box”
- Templates, based on an extended version of HTML
- XSS protection
- Ajax requests by @angular/HTTP
- Utilities for unit-testing components.
- Routing, provided by @angular/router
- Component CSS encapsulation
- Dependency injection
- @angular/forms for building forms
React provides following “out of the box"
- Instead of classic templates, it has JSX, an XML-like language built on top of JavaScript
- XSS protection
- Fetch for Ajax requests
- Utilities for unit-testing components
Thanks to https://programmingwithmosh.com/react/react-vs-angular/