Describe stacks & queues
January 8, 2018
Describe Trees & Graphs
January 9, 2018
 

Pros and Cons of ReactJS

 

Monday, January 8th, 2018

What is React?

ReactJS is a JavaScript library that combines the speed of JavaScript and uses a new way of rendering webpages, making them highly dynamic and responsive to user input. The product significantly changed the Facebook approach to development. After the library was released as an open-source tool in 2013, it became extremely popular due to its revolutionary approach to programming user interfaces.

Pros of ReactJS

Virtual DOM in ReactJS makes user experience better and developer’s work faster

DOM (document object model) is a logical structure of documents in HTML, XHTML, or XML formats. Describing it in layman’s terms, it is a viewing agreement on data inputs and outputs, which has a tree form. Web browsers are using layout engines to transform or parse the representation HTML-syntax into document object model, which we can see in browsers.

The team behind React managed to increase the speed of updates by using virtual DOM. Unlike other frameworks that work with the Real DOM, ReactJS uses its abstract copy – the Virtual DOM. It updates even minimalistic changes applied by the user, but doesn’t affect other parts of interface. That is also possible thanks to React’s components isolation, which we’ll get to in a minute, and a special data structure in the library.

The approach enabled developers to work with UI-objects faster and use hot reloading (applying changes in a real-time mode). Not only did it increase performance, it also made programming faster.

ReactJS permits reusing code components – significantly saving time

  • Another advantage that Facebook introduced with React is the ability to reuse code components of a different level anytime, another meaningful time-saving effect.
  • Managing updates is easy for developers in ReactJS because all components are isolated and change in one doesn’t affect others. This allows for reusing components that do not produce changes in and of themselves to make programming more precise, ergonomic, and comfortable for developers.

One-direction data flow in ReactJS provides a stable code

  • ReactJS allows for direct work with components and uses downward data binding to ensure that changes of child structures don’t affect their parents. That makes code stable.

An open-source library: constantly developing and open to contributions

  • ReactJS was one of the first JavaScript-connected projects released as open source by Facebook.

Cons of ReactJS

High pace of development

  • The environment constantly changes, and developers must regularly relearn the new ways of doing things. Everything is evolving, and some developers some developers are not comfortable with the keeping up with such a pace.

Poor documentation

  • Some members of the community think that React technologies are updating and accelerating so fast that there is no time to write proper instruction. To solve this, developers write their own documentation for specific tools used by them in current projects.

‘HTML in my JavaScript!’ – JSX as a barrier

  • Developers and designers complain about JSX’s complexity and consequent steep learning curve.