Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

ALBERT QERIMI
ALBERT QERIMI
49,872 Points

Angular 2 vs React ?

Trying to decide witch one to learn and stick to it, any helpful material to read or any suggestion ? Thanks

Michelle Cannito
Michelle Cannito
8,992 Points

This is a hot topic. Most search engine answers are from when Angular (2) was still in Beta. For getting a job, I think Angular might be better. It is growing rapidly, whereas React is leveling off (Edit: Don't know if React is leveling off. May not be at all.) Angular is a framework, and as such, the built-in modules will be the same across applications. React is a library-- one picks and chooses other resources to make an application, hence there is no consistency. Some jobs might want React with x, y, z, and others React with a, b, c or whatever.

I heard React is fairly easy to learn, as it is mainly just JavaScript with some HTML injected. Angular, on the other hand, has a steep learning curve. ECMAScript6 (ES6), which all JavaScript developers should learn, is needed, and beyond that, TypeScript, which is a superset of ES6. Angular also has it's own verbs, like *ngFor, and terminology. It gets confusing hooking up components, directives, and services with routing and import/export commands. There are concepts like decorators, dependency injectors, pipes, directives and much more to learn.

The CLI (Command Line Interface) makes building an initial app a breeze (not taught as of May 2017 at Treehouse), but that also has its own set of commands. Code should be transpiled (compiled to ES5, regular JavaScript) ahead of time, and the CLI commands (at least those are easy) are another thing to learn, as also using npm with Babel or devkit and setting up that stuff.

I wish I had a stronger foundation in JavaScript and ES6 before tackling Angular. I thought since Ruby on Rails was fairly easy and straight forward, Angular would be too, but, no, Angular is way harder (to me). Another problem is that there aren't very many great courses yet. (I like "Angular 4 - The Basics" on YouTube, first 2 hours free, than $15 on Udemy.) Wait a few more months, and there will be lots more.

Vue.js is becoming a contender. It is a JavaScript front-end framework that is easy to learn, has a lot of features, can be used for more than SPA (Single Page Applications), and is popular.

My advice:
If you plan on freelancing, learn Vue. If you are still at a beginning level of JavaScript and want to be job-ready fast, learn React. If you are taking several months to learn skills before looking for a job and are at an intermediate or higher level in JavaScript and know EcmaScript6, learn Angular. (Maybe wait until more and better courses are available.) (If a lot of jobs in Vue by that time, go with Vue.)

This link: https://www.youtube.com/watch?v=KMX1mFEmM3E compares the 3; it's titled "Angular vs React.js vs Vue.js - My Thoughts!" and is presented by the guy with my recommended Angular course.