Any library developed will come with its own pros and cons, that also applies for React. So we will first discuss what are the advantages of using React and then where not to use it.
Advantages:
- React sole responsibility is to create reusable and dynamic user interfaces. It gives developer a choice to choose other libraries in our application for event handling, http requests, data binding etc... There are many libraries out there which work very well, some of them include Flux, Redux and Reflux.
- Views are Declarative.
- React uses a template language called JSX to create components, unlike in other libraries here HTML and JavaScript coexists which makes things very easy to understand.
- UI code developed using React is readable and maintainable.
- Everything in React are components and component based development is the future of the web.
- Data always flows in a single direction, i.e. from parent to child, when the state of your application changes entire page re-renders thus updating the effected DOM elements. This approach will help you to debug issues very quickly.
- It updates only what is necessary, even though entire page re-renders when the state changed React only updates those DOM which got changed. This is achieved by React's Virtual DOM.
- It comes with it's own debugging tools.
- It supports server side rendering out of box, which helps search engines to crawl web pages.
- Its learning curve is very low, so any developer with good experience in JavaScript can start working on projects on a fly.
However, you have to be very careful while choosing React. Consider below points while choosing it
- It doesn't support browsers below IE8 and never will.
- If your application doesn't have a very dynamic content, like updating DOM very frequently you might end up writing more code for very small things.
- React is still young and you have to reinvent many things like drop-downs, animations, accordians etc...
- It is just a view layer and doesn't ship with capabilities like event system other than DOM events, a way to make Ajax calls, no data layer to communicate b/w components. So we have to choose everything and make it as a workflow.
Its community is growing and in future we might expect more out of the box, till then, since it's learning curve is very small, I personally suggest you to learn it, you will definitely enjoy learning it.