1. Flexibility: Since React.js is a _library _and not a framework, it offers control to the developer to use any style or pattern for development. The developer is not fixed to a particular pattern. However, there are certain best practices that one can follow while creating SPAs using react.js
2. Performance: React.js uses a declarative style of programming and at its core uses a Virtual DOM to track changes and render the DOM to the browser. It also supports Server-Side Rendering, which enables webpages to be quickly and seamlessly sent to the user. This all means web apps created using React.js are fast as well as resource efficient.
3. Reusability: React.js best practices include dividing the code into components, thereby creating component trees. State can be managed as per the granularity required and only components below in the tree would update. But, components also mean developer has to write less code and can reuse the code for similar components in different sections of the SPA. HOC pattern also exists so that different components can be processed in a similar way thus increasing reusability.
4. Speed of development: Owing to the reusability of components and various patterns along with vast and rich libraries available reduce the time required for developing apps using React.js very less. The developer community is also very active in this library.
1. Rapid pace of development of React: React.js is a library which is still evolving. Every few years a major change is expected that changes the way of development. So developers need to be up to date with their knowledge. For example, in React 16.8 and above, they introduced the hooks and deprecated the use of class components and lifecycle methods.
2. Documentation: With such a rapid pace of development, the documentation does not always remain updated. Although this has improved recently and we get updated documents very quickly.
4. Extensive use of JSX: This is seen as one of the largest drawback of the library. It can be daunting for someone trying to learn React.js. But this can be overcome quite easily and the learning curve becomes flatter with some exposure.
So that was my take on the very popular library that is React.js. Personally, I have found React.js to be very easy to learn and stay updated with the extensive community support from so many talented developers across the world. I have been using React for 2 years now and I have not faced any major difficulty or setbacks in this time.