DEV Community

Cover image for AngularJS vs ReactJS: Comparison between AngularJS and ReactJS
Sanjay Patel
Sanjay Patel

Posted on

AngularJS vs ReactJS: Comparison between AngularJS and ReactJS

When you want to create a single page application the question arrives in your mind: What I will use? AngularJS or ReactJS? I've been using AngularJS and ReactJS for a while now. Both frameworks are super fast, advanced, widely adopted JavaScript (JS) technologies that we use to create interactive single-page applications (SPAs).

Angular, the Model–View–Controller framework has become extremely popular among web developers. React is even more widely used by JavaScript programmers, React is actually a library, not a framework. React only has a View, but lacks Model and Controller components. So how did React became so popular and how can we reasonably compare a framework (AngularJS) with a library (React)?

We can differentiate Angular and React using following aspects:
• Data Binding
• Dependency Resolution
• Templating & Directives
• Componentization
• Performance
• Language
• Concept

Data Biding

AngularJS

Two-way data binding.

ReactJS

One-way data binding.

Dependencies

AngularJS

Manages dependencies automatically.

ReactJS

Requires additional tools to manage dependencies.

Templating & Directives

AngularJS

We make our own directives in Angular to insert data into templates.

ReactJS

React doesn’t offer division into templates and directives or template logic.

Componentization

AngularJS

Based on the three layers — Model, View, and Controller.

ReactJS

Only has a View, but lacks Model and Controller components.

Performance

AngularJS

The performance will decrease a lot if your application has too many watchers.

ReactJS

React makes it simpler to control application performance but this doesn't mean we can't create a fast application in Angular.

Language

AngularJS

JavaScript + HTML

ReactJS

JavaScript + JSX

Concept

AngularJS

Brings JavaScript into HTML Works with the real DOM Client-side rendering.

ReactJS

Brings HTML into JavaScript Works with the virtual DOM Server-side rendering.

Top comments (6)

Collapse
 
hakimio profile image
Tomas Rimkus • Edited

Angular uses TypeScript, not JavaScript or was it an article about deprecated AngularJS 1? Also, did you take the "watcher" concept from Angular 1 as well?

Collapse
 
teclogiq profile image
Sanjay Patel

Yes, actually this comparison focused on Angular1(AngularJS) and ReactJS

Collapse
 
hakimio profile image
Tomas Rimkus

Why? It has only limited support to fix major issues and nobody uses it anymore.

Thread Thread
 
teclogiq profile image
Sanjay Patel

You are right Tomas, but it is not about anyone is using or not and support for fixing issues, it's just simple comparison. Everybody has their choice whether they want to use or not.

Collapse
 
joshistoast profile image
Josh Corbett

AngularJS is also an old framework, we should be talking more about Angular 2+ vs React

Collapse
 
cope profile image
Predrag Stojadinović

The bias is deafening.