Reading Time: 2 minutes
React is an open source library, maintained and used by Facebook. It is also used by many fortune 500 companies.
React is a library not a framework like Angular/Ember and React has many advantages compared to other libraries or frameworks. Why you should use it, below is the quick React Overview.
Learn once, write everywhere –
React was created for client-side component only in 2013 but it is robust and feature-rich library now and it has a strong ecosystem. You can create Static Sites (using Phenomic), a true Native Mobile app (using React Native), Desktop apps (using Electron), Virtual Reality website (using React VR).
Easy to Learn –
React library size is very small and it uses virtual DOM to updates the required section of UI. This approach makes UI rendering very fast and application consumes less CPU and battery of the device.
Community support –
React has strong community support and it is one of the most popular projects on GitHub. If you will try to do something using React, you will find an online example of it.
You can create reusable components using React and it is very useful to implement the ‘Client-side UI composition pattern’ in the MicroServices world. Each MicroServices team can develop a client-side UI component using React, and UI team will be responsible to implement the page skeletons that build pages/screens by composing multiple, service-specific UI components.
No two-way data-binding risk –
There is a risk with two way data-binding if an application is not designed carefully. With two way data-binding, UI change will update model, this model can update another model and another model will update associated UI. This will lead to an unpredictable result, cascade update and debugging will be tricky. React is based on one-way data-binding and application is easy to maintain and perform better, other library like Angular has shifted gear to support this binding approach.
You do not need to migrate the complete application/UI at the same time. You can divide the UI based on component pattern and do the migration in phases to reduce the risk.
Last but not the least, React is based on MIT License now.