Popularity of frameworks in 2018
Comparing downloads amount from official sources.
The State of JS Survey of 2018 - https://2018.stateofjs.com/front-end-frameworks/overview/ shows the number of libraries that programmers usually use.
Wyniki ankiety State of JS Survey 2018
So let's look at the React, Angular and Vue frameworks.
The most popular framework - used by such services as Netflix, IMGUR, Paypal.
One of the most important things about React is that it uses a virtual DOM application that is stored in the internal memory. If anything changes, the system detects changes between the current DOM and the virtual one.
Example of react code.
Another framework after React (in terms of popularity).
It is based on MVC architecture (model - view - controller), it is based on two-way data exchange. This means that any change in the application view is detected and taken into account in the controller layer and vice versa. It uses Two ways data binding - every change in view means change in model and every change in model means change in view.
Google's documentation is very rich. It also has its own library, which has ready-made components with functionality.
Angular example code.
Vue allows you to store HTML templates in internal memory and use them in many places, without the need for separate implementation. Like React, it uses a virtual DOM.
Vue uses a HTML-based template syntax that allows binding the rendered DOM to the underlying Vue instance’s data. All Vue templates are valid HTML that can be parsed by spec-compliant browsers and HTML parsers. Under the hood, Vue compiles the templates into virtual DOM render functions.
Vue example code.
Performance: (size of library)
There is no perfect choice between these three frameworks. Everyone has certain advantages and disadvantages. In order to choose the best one, you have to take several factors into consideration.
Vue.js is best used for low data processing applications, so called CRUD's (Create Read Update Delete), or for applications that are already in use, and to which we want to add a kind of scalability to make it easier to develop. To use this framework you don't need to introduce it in the whole application. What's more, Vue will be suitable for situations when we have not experienced developers, or those who have no previous contact with other frameworks - thanks to the fact that the entry threshold here is the lowest and the team with knowledge of pure JS, HTML and CSS is able to quickly release a working application.
The use of React.js can be recommended in more complex applications or those that are to be used as mobile applications in the future. Native React is the oldest and most stable technology among other "Native" applications. (with extensive documentation). In addition, React can be easily used in smaller applications that need to manage data with Redux and the new React Hooks option.
React is ideal if you don't know exactly what your application will look like in the future.
As far as Angular is concerned, here the matter is simple, there is no point in attaching the whole framework to a project that will have 2-3 subpages. Despite big changes and optimization, Angular is still not adapted to use it in small applications. Websites built on Angular will be too big in comparison to others. It is recommended to use Angular only in large applications, thanks to easy scaling and later expansion. The fact that Angular itself forces us to use Typescript, which is fully object-oriented and statically typed - supports the stability of the project and allows you to capture errors during the construction, and not on the client's desk.