Advantages and Disadvantages of using ReactJS

PerformanceOpen SourceReactjsJavascript

Performance Problem Overview


I am new to using React for development.

Can someone list the advantages and disadvantages in using ReactJS. Are there any performance issues with using this library for large projects.

Performance Solutions


Solution 1 - Performance

Advantages of using React:

  • easy to know how a component is rendered, you just look at the render function.
  • JSX makes it easy to read the code of your components. It is also really easy to see the layout, or how components are plugged/combined with each other.
  • you can render React on the server-side.
  • it is easy to test, and you can also integrate some tools like jest.
  • it ensures readability and makes maintainability easier.
  • you can use React with any framework (Backbone.js, Angular.js) as it is only a view layer.

What is not so good about React?

  • it is only a view layer, you have still to plug your code for Ajax requests, events and so on. Some people get surprised by that.
  • the library itself is pretty large.
  • the learning curve can be steep.

If react-native is really how it was described, react is going to become even bigger.

Performance wise, it is really good as it relies on a virtual-dom to know what is really changing in your UI and will re-render only what has really changed. It does have trouble with very large, slightly changing, lists of children (2000 <li> test), but can be optimized simply.

If you are not sure, just think about the big projects using React: instagram, hipchat, facebook chat and so on.

Some resources:

And probably one of my favorite blog post Why React is awesome?

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionXpertSijiView Question on Stackoverflow
Solution 1 - PerformanceJeremy DView Answer on Stackoverflow