The goal of this article is not to find the best technology, but to compare, highlight, and clarify few misconceptions. We’ll also focus on what is important instead of minor details that do not really matter in the long-term.
You should be aware that the comparison between these two technologies cannot be fully covered. Angular comes with a complete framework (MVC), while React is a fronted-library with lots of open-source packages to integrate with. One is about a monolithic structure (Angular), like a box of tools that comes with everything you need, while the other (React) doesn’t come with everything, but have lots of good options to integrate with.
Future sections will be added based on demand from the comments.
Here’s a quick side-to-side comparison between Angular (left) and React (right).
Angular and React
One thing that is really great about React in terms of performance is the Virtual DOM, which you’ve probably heard about a couple of times. If not, don’t worry, I’ll explain it!
Let’s say you want to update a user’s birth date within a block of HTML tags.
It only updates the part that is required by seeing the differences between the previous and current HTML version. Its a similar approach to how GitHub operates when detecting changes in the file.
It will update the whole tree structure of HTML tags until it reaches the birth date.
It may not matter for the problem described above. However, if we deal with 20–30 asynchronous data requests on the same page (and for every page request we replace the whole HTML block), it will influence performance as well as user-experience.
But first, back to the beginning…