So without further ado here are a few reasons why React is so popular:
- React use reusable, composable, and stateful components:
In React we use components to create our user interface. You can think of components as a class or a function with simple parametres, we call it with some inputs and they give us some output. As we said components are reusable so we can use reuse it anywhere we want in our project and even on others projects. We can also compose bigger components with other smaller ones.
The output of a component is a description of a user interface which could be an HTML element or another component.
In other word, components are the future of web development.
- The Ecosystem
React nowadays can be considered more of an ecosystem because of its capabilities to support a wide selection of various architectures and applications, And with the success of externale libraries developers are creating new ones for React.
- React’s efficiency
React create its own virtual DOM, this gives you enormous flexibility and amazing gains in performance because React calculates what changes need to be made in the DOM beforehand and updates the DOM tree accordingly. This way, React avoids costly DOM operations and makes updates in a very efficient manner.
React stands out from the crowd because you can run it on the server, and the virtual DOM will be rendered and returned to the browser as a regular web page. No need for PhantomJS and other tricks!
- Mobile Apps
If you’re good at React you can easily start building mobile application using React Native which follows same design patterns, making the transition easier, the business code is basically the same the only changes are the ‘DOM’ elements but the good thing that React-Native give you a ready-to-use native IOS and Android components such as Views, TextInputs, Camera access, etc…
It’s true that React has a lot of benefits, but it is by no means perfect. Because it is still relatively new, it’s continuously changing. Even you you can contribute on making React more capable and more powerful.