No doubts, React gained its popularity deservedly. Thanks to its numerous advantages it has a whole army of admirers and contributors. 6th place on the GitHub trending list and 75.000 stars are a solid proof of that.
Pros of ReactJS
1. An open-source nature
2. Virtual DOM
That’s the thing which 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 smallest changes applied by the user, get updated without affecting the other parts of 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
About this we were partially talking in the previous paragraph.
ReactJS lets developers forget about usual upgrading headache by allowing to reuse already 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 that 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. Witty component structure allows to work with those directly. And usage of downward data binding ensures that changes of child structures won’t affect their parents.
Therefore, ReactJS 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
Frequent updates and releases of new tools are playing a bad joke here. Because of those 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
No wonder, this problem applies not towards documentation only. With such ever-changing environment developers are just ought to keep up with lots of new features. Sure thing, lots of them aren’t happy about it.
3. JSX as a barrier
Pros of React Native
1. All the best features according UI are preserved from 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 renders some code components with native APIs. 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
Those greatly increase performance in such heavy operations like image editing or video playback. Thanks to its open-source nature enjoy lots of native modules written in Objective-C and Java out-of-the-box. Or, if you have necessary skills – write your custom modules. And, of course, thanks to a wast community lots of things are available from beyond.
Cons of React Native
Problem is majorly the same as with ReactJS. It is also aggravated by the fact that community is pretty young so the available documentation is fairly 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. And the spectrum of possible features which developers may want to implement in their apps wishes better.
3. SDK updates
This is where open-sourceness does a disservice once again. After every iOS or Android SDK update React Native’s team should integrate a code library with new software. But even 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.
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.