Frameworks: Choosing between React, Angular and Vue.
Tags: webdev, javascript, programming, react
Published: 2023-01-26 13:07:00

Frameworks have helped make JavaScript load time faster. Using pure JavaScript for large projects that update from time to time is suicidal, and hence the need for frameworks.

**What are JavaScript frameworks**? These are collections of JavaScript code libraries that provide developers with pre-written JavaScript code, so these libraries can be used in projects. A framework takes absolute control of the structure of the project, its features and its behavior. Think of a framework as a car with multiple libraries such as steering, oil gauge, carburetor, engine etc. The car controls how these other parts work and when they work. A framework cannot work on its own without the collection of libraries built into it, the same way a car can’t function on its own without the engine; Yes, that’s a framework.

I can say for sure, that over 95% of JavaScript frontend developers use one framework or another because it makes work faster and also makes JavaScript easier to use. Using vanilla JS can be a suicide mission because of its complexities when used for large projects or when you need a faster application. So now let’s talk about which framework you should choose after getting familiar enough with JavaScript.

Our frameworks to choose from are React, Angular and Vue, and that’s because these are the most preferred and popular front-end frameworks used by developers in the space.

**REACT JS**: This is the most popular and most widely used framework out there by front-end developers. 8 in 10 developers use React for their projects, and this is because it is fast, reusable, scalable and has a very large community supporting. React has so many advantages that will make you adopt it as your preferred framework. Let’s look at some of the reasons why so many developers use React.

1. **It is component-based**: Components are self-contained modules of code that make it easier to manage state and reuse code. Since most of the codes we write as front-end developers is to solve state management, components make it easier to separate state and not just lump all the UI in one file. With components, codes are easier to write, read, re-used and modified.

2. **It uses the virtual DOM**: This is one of the reasons why React is the fastest framework. Because it uses the virtual DOM, React only re-loads the part of the UI where changes were made. Unlike vanilla JS that reloads the whole entirety of the page, only the component that changed is reloaded thereby resulting in a faster application.

3. **It supports enterprise applications**: React has made enterprise applications endearing because of its so many advantages and ease to use. Enterprise codes are written in separate bits for easy read and management, and React has that offered that on a platter of gold such that enterprises only have to manage code in one component instead of having to make changes in a very large codebase.

React also has some **Flaws**, and notable among them is the fact that it only supports the View in the Model-View-Controller(MVC) pattern.

**ANGULAR JS**: This is a structural framework for perfect Single Page Applications(SPAs). It was the first of it’s kind, because it set the tone for the invention of other front-end frameworks.
Angular is easy to learn and use and one of it’s biggest advantages over other frameworks is that it can be used directly in HTML using the _<script>_ tag as entry. Like React, Angular has some reasons why the earlier adopters of frameworks adopted it, and why some new developers prefer it too. Let’s see some of those reasons.

1. Applications built with Angular have very good performance, if not the best.

2. Angular has good maintainability.

3. **It supports the Model-View-Controller(MVC) pattern**: The MVC pattern divides your codes into three(3) segments; model, view and controller. Model represents data, View represents UI, and Controller represents the logic. This pattern makes codes esier to read and maintain.
The notable Flaw in Angular is that it uses the regular DOM, which loads the entirety of the page when changes are made to the code, and so this makes loading time slower.

**VUE JS**: Vue is an adaptable framework, in that it can be easily integrated with other frameworks. Vue is a perfect framework for the undecided developer torn in-between Angular and React, because Vue allows you to write your UI template in HTML, like Angular and package these templates into components, like React. Vue supports both HTML and JSX, so it is easy to learn and use. Reasons why some developers prefer it is limitless, and it’s the fastest growing framework so far. Let’s highlight some of the reasons.

1. It is very easy to learn and use.
2. It is very adaptable, and can easily be integrated into other frameworks.
3. It can be used for large applications.
4. It’s the best of both worlds in Angular and React.

**MY VERDICT**: I’ll choose React because it is widely adoptable and is simply the most used by enterprises, and the most sought-after framework by** RECRUITERS**.

If you think this was helpful, you can **Follow me** and like the article. It will encourage me to write more articles like this.

Have a great day friends.