Which JavaScript framework should I learn?
Which JavaScript framework is the best? Which one should I learn first, second…etc? These are some common questions before learning your first framework. The question really should “How do I choose a JavaScript framework that fits me and feels the best?”
Arguably, the most popular frameworks being used today are React, Vue, and Angular. On a Stack Overflow survey, the most popular frameworks include Angular and React, but no Vue. It’s all a matter of perspective, how you ask questions, where they come from and who’s answering those questions. So how should we really go about evaluating these?
One way is to consider some of the following features:
- Component Communication
- Lazy Loading
- Common Language
- Standout Features
React
Component communication
- Sends data up and down through props
- Common language is Javascript
Lazy Loading
- Lazy loads their components
Common Language
- JavaScript
Standout Features
- Components, React’s Redux
Vue
Component communication
- Send data down through props
- pass data up using $emit command
Lazy Loading
- Lazy loads their components
Common Language
- Babel
Standout Features
- Simplicity to build applications
- Vuex (state management) — creates one file to manage the state’s reducers and mutations are actually in Vuex instead reducers
Angular
Component communication
- Sends data down using inputs
- Sends data up using RxJS observables (most common) but can also use event emitter
Lazy Loading
- Load sets of components using NG module (group them into a bucket)
Common Language
- TypeScript
Standout Features
- Full framework
- Manages state using NgRx (the least amount of code out of all three frameworks)
Which should I choose?
Try them all. Each one are extremely powerful in their own way. When you learn one, the other two are significantly easier. What’s more important to note is that if you’re planning to stick to JavaScript, you’re better off learning TypeScript sooner than later because they are growing in popularity in all three frameworks.