DEV Community 👩‍💻👨‍💻

Lucas Paganini
Lucas Paganini

Posted on • Originally published at lucaspaganini.com

How to choose a javascript framework

Learning how to choose a javascript framework


See this and many other articles at lucaspaganini.com

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.

Company 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.

Framework 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.

Angular

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!

React

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 axios
  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.

Vue

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.

Full 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.

Conclusion

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 see you soon!

Top comments (1)

Collapse
 
andrewbaisden profile image
Andrew Baisden

I almost learned Angular because that was the framework that many companies were asking for when I first started to look for work. Even if the job description said React they wanted to know if you had Angular too because back then some companies were transition from Angular to React.

I know it's much more different these days because Angular has newer more stable versions which i why we have the big 3 and Svelte on the side.

🤯

"I made 10x faster JSON.stringify() functions, even type safe"

☝️ Must read for JS devs