Will React Native Mark the Demise of Native App Development?
With the rising popularity of React Native, what will happen to Swift and Java/Kotlin in the mobile app development world?
Join the DZone community and get the full member experience.Join For Free
If you still don't believe that these apps can be really be awesome, take out your phone and have a look at one of these apps: Facebook, Messenger, Instagram, Skype, and Airbnb. They are developed in React Native.
What Is React Native?
The best part is React employs a faster virtual DOM. Although React is a library, lightweight components can be injected anywhere. You can use react with PHP, MySQL, Firebase, MongoDB, or any database system of your choice.
You must be wondering, isn’t React for designing web applications? Consider React Native as the successor of React.js for mobile app development. All the things that you learned in React like component props, states, Redux, modals, etc. are part of React Native as well.
The things that you learned in React can be applied in React Native in the same workflow. Components, props, and states are all used in React Native and thus you get your native application.
The Dual Advantage of React Native
In React Native, unlike native Java and Swift code, you don't ever compile your app. You just reload it just like do you a website in a web browser.
Moreover, you don't have to maintain two separate codebases for your application. For example, let's say you are a business and I am application development company to whom you have outsourced a mobile app project.
Of course, you want an app for both Android and iOS in addition to the web. It requires two teams, one for each mobile platform: one team for the Android application and one team for the iOS application. Omplementing the same exact features in the iOS and Android apps would require a lot of communication between those teams: app features, deadlines, delivery, client expectations and requirements, etc.
Performance Compared to Native Code
React Native apps perform, more or less, like an app written in Swift or Java/Kotlin. A Medium user ran a few tests to compare its performance with the native code and found performance to be on par with an equivalent app in Swift, sometimes even better. The Medium article measured performance in three areas: CPU, GPU, and Memory utilization at the run time.
In CPU usage, the performance was similar although maps performed better in Swift.
To calculate GPU performance, Native vs, React Native, the author calculated frames per second (FPS) of the application under GPU load. Surprisingly, although by small margins, React Native outperformed Swift by more 6.25 frames per second.
For memory tests, the author concentrated on maps as the memory footprints of other features was negligible to figure out a contrast. Evidently, at the peak performance, React Native used a whopping 61.11 MiB less memory than Swift. While performing the task and recording the measurements, a spike in Memory usage was observed at the exact moment, he pressed the “Maps” tab, which prompted the MapView to find my current location and highlight it with a blue, flickering dot.
React Native Is the Smartest Way to Develop Mobile Apps
In React Native, you just have to maintain a single codebase and that code will produce native Android apps as well as iOS apps. React Native is getting a lot of attention and people love how things are shaping up for React Native and the community is growing.
Is This the End of Native App Development?
No, there is still a need for native applications. Some businesses prefer React Native while others prefer native code in Kotlin or Swift. It's always good to have many mobile technologies around to choose from. Desktop application developers always had a lot of programming languages and technologies to choose from and most of them are still here, going strong.
For example, there are still apps that are being developed in Ruby on Rails, Django, PHP, as well as Node.js. Technologies evolve as per the demand.
The biggest takeaway of React Native is now there are more options than ever. Developers can go with Android development using Java or maybe Kotlin. Likewise, they can go for iOS development using Swift. With React Native, they have one more option to native development. Not to mention, now everyday web developers can also be part of native app development party.
The Tremendous Growth and the Future
Nevertheless, React Native is growing at a tremendous pace and if the growth keeps pace, soon we will find more React Native developers than those using Swift or Kotlin for development. This development in the mobile ecosystem will mark a huge shift from the traditional form of mobile development. The field will evolve to absorb React Native development or any similar emerging or upcoming technologies into mobile app development.
Google Trends is a popular tool to understand people’s interest in a search term. When used to forecast people interest in technology or a mobile development technique in this context, it can tell which of them are growing which are plummeting.
Source: Google Trends
Clearly, while React Native has grown exponentially and iOS development has remained static, Android development has a seen a huge plunge. This made me think: is the growth in React Native at the expense of Android development? It is too early to say but one thing is for sure: iOS development is here to stay while the future of Android because of React Native is in disarray.
Android developers have a consistent complaint. They don’t earn as much as their iOS counterparts and the ROI is hard to come by. And the revenue gap is almost twice in a few demographics.
Perhaps, app platforms find React Native as the answer to their Android development woes.
Blurring Lines Between Android, iOS, and Web Development
Published at DZone with permission of Aditya Modi. See the original article here.
Opinions expressed by DZone contributors are their own.