Monday, January 8th, 2018
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.
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
One-direction data flow in ReactJS provides a stable code
An open-source library: constantly developing and open to contributions
High pace of development
Poor documentation
‘HTML in my JavaScript!’ – JSX as a barrier