Opinion Angular Vue React
Created at "April 14, 2023". Last update at "September 10, 2023"
In this article I will leave my thoughts and comments about Angular, Vue, and React. My point of view born with my 6 work experience with Angular and my last 2 years learning Vue and React with courses and side projects.
Angular
Angular is a framework to build Web Apps. It is the oldest option from the 3 that I talk in this article. With the support from Google, Angular born as AngularJS library with the idea to use components, services, controllers, and pipes on Web Apps to simplify the way of built interfaces with a lot of tools for form validation, server communication, directives, a CLI, and others. Some of these ideas brought from backend side but hard to apply on frontend side until that moment.
For Angular 2, the Angular team wanted a huge improvement with more backend ideas as modules and types. Maybe for that some people, including me; think on Angular as frontend framework for backend developers. To apply those ideas added Typescript. But Angular team made a big mistake. They forgot the developer experience and how breaking changes affects upgrade apps within a company.
To upgrade an Angularjs app to Angular 2+ you need to rewrite your app. And most of the people doesn't want to do that because it means time, effort and money to do it. For the side of developer experience, learning curve is higher than Vue or React, and for that reason it lost a lot of popularity. For subsequent releases, Angular has less breakings changes and it's simpler to upgrade an app. Also, Angular becomes more verbose then you need more boilerplate to build a component or if you need a new route in your app, you need as minimum 2 files and changes in another one. With Angular v15 this is changing with standalone components and functional routes. This is so helpful.
Pros of Angular: It's an established framework that it give you by default most of the tools that you would need to create a web app: Routing, HTTP requests handler, Forms, Pipes or the way to implement other things like router guards, directives, and others. Also you can find others libraries to extend its functionality as Ngrx for state management. In other way, Angular gives you some best practices that later you have your project structure following them, to writing a new feature is easier because the process is similar. Also other thing is the support, the Angular team always is working in new things or fixing bugs. Right now, every 6 months you have a new Angular version.
Things to improve of Angular: It needs to improve its bundler and builder. Angular uses Webpack but it's slower, then the developer experience is awful.
Angular future is about to improve performance. Right now, Angular has a branch on git where Angular team is testing integration of Signals on Angular. This will help to improve performance because the change detection phase can be more precise, only triggering rerendering of the things that needs an update and it's no needed to update or rerender all components inside a zone.
Vue
Vue is a framework to build web user interfaces and it born like a child between Angular and React, taking the best of both worlds. The simplicity, performance, and customization of React with less boilerplate, but with a structure, order and tools that you need to build web apps like Angular. As routing, forms tools, directives. All these things with a better performance. And you can use other libraries to replace the recommended by Vue.
Vue doesn't has a big company supporting it as Angular or React. The community is the biggest support. But with time more developers and companies believe on Vue then they use it.
With Vue 3, the Vue team wanted a huge improved and implement types and hooks from React. They implemented types with Typescript but it is optional. You can still use javascript. But with all changes Vue made the same mistake that Angular. To upgrade from Vue 2 to Vue 3 you need to rewrite your app totally. With that another issue is that you need to change most of the libraries that you use with Vue 2 because Vue 3 can't support most of them.
Pros of Vue: For me, the best thing of Vue is the wide vision. Always open to watch other frameworks and libraries to take the best and implement it in Vue as hooks. Other point, it's about the slowly but constant growing as ecosystem as jobs. Right now there are more open positions to work with Vue and you can find a lot of libraries to add functionalities and you find support for Vue. In other hand, simplicity is great, you can start an app with few code and so fast. You can start an app with only javascript and the migration to Typescript is so easy and you can do it in parts.
Things to improve from Vue: I think that it needs to improve the documentation about issues or for integrations with other libraries. You maybe will find difficulties to get information to do some things or resolve some bugs. And that is always a big problem on a framework.
Vue future is about to resolves bugs and continue improving things like performance and SSR support. Vue is other framework working in a way to implement Signals on Vue (called Vapor mode). Maybe in last quarter of this year we can try it.
React
React is the most popular library to build web apps. It was created by Facebook with philosophy of create reusable user interfaces with great performance focus on components using the technique of Virtual DOM where before to do changes on DOM, React has a copy of the DOM where React confirm what changes are needed and only execute those changes on the real DOM.
React also uses JSX that is a javascript file where you can write HTML. Other great thing about React is that React team avoid breaking changes where they release a new version, then most of the time update an app is an easy process.
For me, when you start with React is so easy but at the same time is so powerful because React give you some tools to improve performance of your app on your own. Like useMemo, useCallback, and others.
Pros of React: React has a big community, big ecosystem, and great support. You will find a lot of information about bugs, how to build some features and a lot of compatible libraries to extend React functionality there are a lot of options then you can choose best fit depending on your needs.
Things to improve from React: Right now, I believe that React needs an improved way to handle forms as Vue or Angular. Other thing is look for new ways to improve performance because there are other frameworks taking advantage on this aspect. For example using Signals.
React future is about to improve developer experience improving documentation and devtools. You can see this with the new React page. Also improving tools to work with SSR.
That is all.