6 factors crucial to React Native Vs. Native Performance
This post compares some of the aspects related to performance and usage of applications built with React Native and Native programming. These technical components to development of React Native could influence your initial decision making process.
1. Cross platform
The same code in React Native can be used to develop applications for multiple platforms(iOS, Android), therefore providing unified code base, increasing the outreach and reducing development as well as maintenance time.
Whereas, native programming requires the use of platform specific coding language for development such as Objective C or Swift for iOS, Java for Android and so on. Therefore, they have longer development time which further increases the project scope and development processes as different teams will be required to work on each platform.
2. Hot reloading in Reactive Native
3. Memory allocation
React Native runs on different realms of memory on iOS and Android versions. As there is yet no tool to interpret them together, each realm has its private address space in memory. This results in more utilization of memory than in case of the Native apps. Moreover, there have been some out-of-memory errors and issues with the Android version of React Native.
4. Cost Saving with React Native
5. UI performance
React Native has a thread for business logic (JS thread) and a layout thread for UI which proves to be very useful and efficient when it comes to long running tasks. This saves any blocking of the UI and therefore avoids UI freezes or violations in an app written with react-native
6. CPU usage
As mentioned in the above point, React Native has separate threads for business logic (JS thread) and UI (UI thread). The framework offloads all the logic to main JS thread, thereby sometimes causing delays in callback handling during heavy loads as JS thread gets too busy in performing other tasks. This results in the utilization of more CPU as compared to Native apps.