If you are looking for the ultimate comparison between Angular vs React vs Vue then you have come to the right place to learn about each one of these incredible technologies.
Third on the list is Vue or better known as Vue.js which is very similar to React except in the way that the view layer is built. If you are not familiar with the MVC pattern, you might want to brief yourself on that before finding out more about Vue. Aside from design patterns, Vue uses HTML templates with an option to write in JSX whereas React uses JSX only. Because there is no other option in React to use anything else, some people think React is pretty limited. Lets see if it fits the bill.
Over the last few years, developers were mainly in debates on whether Angular was better than React or vice versa. Then a third player had entered the arena and everything changed. Vue.js debut and made a big splash. Created by an ex-Google employee, Vue.js grew in popularity especially in China, Taiwan and Vietnam.
From the chart below, you can see that React leads the number of downloads over the past two years.
One of the reasons why React is downloaded so often is because of the job market. Comparison of job listings in March 2020 yielded 16,237 jobs for Angular, 60,595 jobs for React and 3,914 jobs for Vue.js.
When a web page loads, the browser creates a HTML DOM (Document Object Model) that represents all the elements on the page. Angular is the only technology that accesses the regular DOM whereas both React and Vue uses a virtual DOM.
From the table above, it shows Angular performs faster than both React and Vue.
Putting together a technology stack to start a development project may be more difficult than it looks. Start with you developers and find out their knowledge and experience of a specific technology.
You can use online playgrounds such as CodePen, CodeSandbox, Glitch and Stackblitz if you’re interested in playing around with React. The beauty of using React is that you can use as little React as you want or as much as you want.
With Angular, it’s a little more setup than one prefers. As a prerequisite, your development environment requires a current, active LTS or maintenance LTS version of Node.js and a npm package. With this installed, the Angular CLI is used to create projects, generate application and library code and perform a variety of tasks including testing, packaging and deploying.
Luckily for those who want to start Vue.js, there are two ways to start. One way is to inject Vue.js into a HTML file and the second way is to use the Vue.js CLI or command line interface. Before taking the latter choice, get familiar with Node and npm/ yarn.
Memory gets allocated when the program creates an object or released when the program no longer needs it. The garbage collector (GC) looks for values that do not have any references to them throughout the program and decides to release an object from memory. In normal situations, the GC works tirelessly allocating and releasing memory but when it gets overwhelmed, that’s when issues arise. The problem is that developers can accidentally cause a memory leak using Angular. One possible way in Angular is by adding an event listener to a DOM object. If the developer forgets to remove the listener on the $destroy event of the directive, it will hold a reference to a DOM node even if it is removed from the document. The DOM tree will then become a detached DOM tree and the result will cause a memory leak.
Memory leaks can occur just as easy in React as in Angular. A basic strategy is to ensure that all listeners and callbacks are properly cleaned up when the components unmounts. In a Single Page Application (SPA), it is difficult to avoid memory leaks because the page is not refreshed.
If using Vue.js, avoiding memory leaks is usually easier because most leaks are not in Vue.js itself but when different libraries are incorporated.
The Cons of using Vue.js:
- Lack of resources. Vue.js still has a pretty small market share in comparison with React or Angular, which means that knowledge sharing in this framework is still in the beginning phase.
- Risk of over flexibility.
- Lack of support for large-scale projects.
- Lack of experienced developers.
- Language barrier. Vue.js is very popular in China causing a lot of discussions, descriptions and instructions to be in Chinese. Unless you are fluent in Chinese, it may be difficult to figure out how to use features or troubleshoot issues.
The Cons of using Angular:
- Performance. Complex SPA’s may be slow and inconvenient to use due to their size.
- Steep Learning Curve. Learning Angular isn’t easy and hinders quick starts.
The Cons of using React:
- High pace of development. Developers complain that React is changing too rapidly and that they cannot keep up.
- Poor documentation.
- Steep learning curve in JSX.
Developers starting to learn Vue would love the documentation available on Vue. Candidly speaking, Vue’s documentation is better than React thereby making Vue easier to learn. Many developers are switching to Vue. Laravel community has also considered it as one of their preferred front-end frameworks. Overall, Vue provides an answer to the issue of React and Angular and is a much simpler and easier way to code.
Disclosure of Material Connection: Some of the links in the post above are “affiliate links.” This means if you click on the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.