React gained its popularity deservedly. Thanks to its numerous advantages it has a whole army of admirers and contributors. It is sixth on the GitHub trending list and has 75,000 stars.
Pros of ReactJS
1. Open Source
2. Virtual DOM
Virtual DOM helps ReactJS developers work faster and makes UX and UI smoother. Other frameworks work with the Real DOM, while ReactJS uses its abstract copy – the Virtual DOM. It’s like a virtual browser instead of the real one. And thanks to the special component structure in React, even the smallest changes applied by the user, get updated without affecting the other parts of the interface. Moreover, developers aren’t obliged to bind DOM with functionality in the front-end, as elements are already connected to it. Which also allows developers to use hot reloading, which means changes get applied in a real-time.
3. Reusing Code Components
ReactJS lets developers forget about usual upgrading headache by allowing reuse of existing components. Since all components are isolated, any kind of change in one component doesn’t affect others. This brilliant function allows developers to reuse components which don’t produce any changes in and of themselves. Needless to say, this makes programming way more comfortable and precise for developers, which consequently raises production speed.
4. One-direction Data Flow
ReactJS is all about stability and simplifies data binding with such flow. As child elements cannot affect parent data, to change an object developer has to modify its state and apply updates. Which means only allowed components will be upgraded.
Cons of ReactJS
1. Poor Documentation
Because of frequent updates, documentation updates just can’t keep up. It only gets worse, as lots of contributors do not consider it necessary to write a proper documentation because of such rapid development pace.
2. High Pace of Development
With such an ever-changing environment, developers have to keep up with lots of new features. It can get overwhelming.
3. JSX as a Barrier
Pros of React Native
1. Features work with ReactJS
And, of course, downward data flow is present as well. Therefore core components are fully editable and those won’t influence child components. Just like with ReactJS, UI development becomes way smoother while positively impacting UX.
2. Native Controls
React Native communicates with targeted components for iOS or Android and renders code to native APIs directly and independently. Doing that, React uses a separate thread from UI, which also increases the performance score.
3. Native Modules
Native Modules greatly increase performance in operations like image editing or video playback. Thanks to its open-source nature, lots of native modules are written in Objective-C and Java out of the box, or you can write your own.
Cons of React Native
Because the community is so young, documentation can be poor.
2. Third-Party Components
Despite a decent variety of out-of-the-box components, the number of third-party components is pretty limited. And there is no assurance that those will be supported by the next releases. The spectrum of possible features which developers may want to implement in their apps wishes better.
3. SDK updates
After every iOS or Android SDK update React Native’s team should integrate a code library with new software. But because of the unbelievable pace of React Native developers and contributors work cannot compensate its vastness. Therefore, updating every piece of the API often takes a decent amount of time.
Did we miss any pros or cons? Let us know in the comments below.
Author – Alex Volski:
I’m a content writer at Thinkmobiles for 5 years. And I have a confession to make. I’m keen on web development. That’s why I’ve decided to become web developer myself very soon. But, for now on, I’m just walking around and constantly bother our web developers =). So if you’d like to chat about web React, Angular, JS or whatever – please contact me. Hope to hear from you soon.