How to choose a javascript framework in 2021

Choosing a javascript framework in 2021

React is a Frankenstein, Angular is too complex and nobody uses Vue. So I’ve created a new and better JavaScript framework!

Relax, I’m joking haha.

Let’s talk about which JavaScript framework you should learn.

LinkCompany Preferences

First off: If you’re working for a company or you’re trying to join one, learn whatever they’re using.

Now, if they’re using something outdated, like jQuery or AngularJs. Then, in this case, you need to learn what they use and also learn a new modern one to switch to later.

Do not annoy your team members talking about switching frameworks before doing your research and listing all the benefits.

Switching frameworks is a huge effort and chances are that they’re already very proficient in the current framework and don’t want to lose all that knowledge.

LinkFramework Trinity

If you do have the power to decide any framework, my advice to you is: Stick to the framework trinity.

Svelte is cool, Elm even more and Polymer is a candy. But you’ll have a really hard time finding jobs that use them. Leave those for your weekend hackathons and stick to Angular, React, and Vue for the big projects.

LinkAngular

Angular thrives with complexity. It has what you need, what you don’t know that you need and what you don’t need. All out of the box.

The learning curve is indeed steep, but I think it’s totally worth it because it’ll save you many headaches in the future.

It comes with dependency injection, internationalization, forms handling, scoped styles, server-side rendering, routing, lazy loading, animations, a CLI, a style guide, coverage reports, setup for unit and integration tests, an HTTP client, and conversion to native custom elements.

If you need more, there’s also a component development kit.

It is huge!

LinkReact

React alone is just a rendering library, but when you use it with create-react-app, Redux, Gatsby, or NextJs, you get a full framework. Despite being easy, as you go to implement third-party libraries, your project will become more complex. Everything that doesn’t come with it, you can add later:

  1. Server-side rendering with Gatsby or NextJs.
  2. Scoped styles with styled components.
  3. HTTP client with apollo
  4. Routing with ReactRouter
  5. So on…

The upside is that it’s more customizable than Angular. But that can also be considered a downside because any new devs will need to study not only React but also all the tools that you choose to use with React.

LinkVue

Vue is a great middle-ground between React and Angular. It’s less complex than Angular and more complete than React.

It has a CLI, a fast learning curve, and you can add more things later, like:

  1. Server-side rendering with Nuxt
  2. Router with Vue-router
  3. Forms validation with vee-validate
  4. State management with VueX
  5. So on...

Another huge difference from the other two is that we don’t have a huge company sponsoring Vue. It was created by a single developer and it’s maintained by the open-source community. They have explicitly declared that their priority is to ship quality code that is ready for production rather than hitting specific deadlines.

It all seems great, but Vue is the least used in the production of the three. It's very popular in the east, but not as much in western countries. Many libraries are written in Chinese, which might be a problem if you don't know the language.

LinkFull Disclosure

For full disclosure, I prefer and am most proficient with Angular. I love TypeScript, I love having everything out of the box and most of my clients use Angular.

That said, I wish it was less object-oriented and more functional. Like, React with hooks and functional components.

LinkConclusion

Please tweet me if I’ve missed anything. Making a good decision is more important than me being right, so if you have something to contribute, please leave your opinion on my Twitter.

I hope this was helpful. Have a great day and I’ll see you soon!

Join the newsletter and be the first to know when I launch a course, post a video or write an article.

I don't SPAM, one email per week tops.