It’s no secret that having a strong mobile presence is no longer optional. Worldwide, mobile devices have outgrown desktop use, and the trend toward mobile computing is transforming how organizations communicate with their customers, present their ideas, and reach their business goals.
For a long time, native mobile apps ruled digital distribution platforms and marketplaces. Developed in a platform-specific programming language, such as Swift for iOS or Java for Android, using platform-specific tools, they provide seamless access to native platform APIs, and their optimized performance ensures the best user experience possible.
However, native mobile apps are not without their fair share of disadvantages. Their biggest downside is that it’s not possible to deploy the same code on different platforms. Let’s say an organization decides to develop an iOS app and hires or outsources software developers, UI specialists, and other professionals. To make the same app available to Android users, the organization would have to hire a new team to port the app to Android.
Not only is it expensive to target multiple platforms with native development, but it can also be very time-consuming. By the time the app is finally in both the Google Play Store and the Apple App Store, there might already be many competing apps with great reviews, making it difficult for the newly released app to gain traction. Of course, making the app available is just the start of a new phase, characterized by ongoing maintenance and feature upgrades, and it goes without saying that it’s far more cost-effective to maintain a single codebase than two.
But, again, mobile web apps are not without drawbacks. While their inherent performance limitations are fairly easy to overlook these days, the fact that they don’t provide access to native components greatly limits what can be achieved with them. Users have come to expect native features, such as voice input, push notifications, and GPS, and they will actively avoid mobile apps that don’t support them.
What is NativeScript?
Some of the most popular apps created using NativeScript include the dating app Strudel, the cryptocurrency wallet BitPoints, the photo-sharing app for parents and nannies called Daily Nanny, the energy consumption monitoring app Regelneef, and the food delivery app Dwitch.
“We love working with the NativeScript team because of the way that they empower web developers to leverage their skillsets to build native experiences on mobile,” says Stephen Fluin, Developer Advocate for Angular at Google. “By using a technology like NativeScript, we gave our Netcentric frontend teams the power to build amazing native mobile apps. This enables us to do more on mobile than we could ever do before,” Even Payne, Senior Front-End Software Engineer at Netcentric, echoes the same sentiment.
What is React Native?
Thousands of apps use React Native, including some of the most downloaded and popular apps in the Google Play Store and the Apple App Store, such as Instagram, Bloomberg, Pinterest, Skype, Tesla, Uber, Walmart, Discord, Salesforce, SoundCloud Pulse, Vogue, and Townske.
“Looking back at the past three years, React Native has proven to be extremely successful at Discord and helped drive our iOS user adoption from zero to millions!” said Fanghao (Robin) Chen, Mobile Lead at Discord. “More specifically, React Native has allowed us to reap the benefits of quickly leveraging reusable code across platforms, as well as develop a small and mighty team.”
NativeScript vs React Native comparison
Now that we’ve introduced both NativeScript and React Native, it’s time to take a closer look at some of the key differences and similarities between them.
NativeScript relies on either Angular or Vue.js for building engaging user interfaces, whose lightweight nature makes it great for mobile development. Vue.js for the web and NativeScript-Vue are very similar and getting started using NativeScript-Vue is a matter of switching the plugin you include at the start, changing your app instantiation parameters, and writing your front-end templates to use NativeScript modules.
Both NativeScript and React Native can be debugged using Chrome Developer Tools, also known as Chrome DevTools. React Native users can also take advantage of React Native Debugger and Reactotron, while NativeScript users sometimes use the Visual Studio Code NativeScript extension. It’s also possible to use XCode for debugging generated views of apps developed in both of the mentioned technologies.
React Native doesn’t have a specialized marketplace for plugins, but it’s easy to extend the built-in components it comes with by searching the npm registry for packages mentioning react-native. Using native modules, developers can write real native code and have access to the full power of the target platform, but it’s rarely necessary to do so since React Native is very capable right out of the box.
At the time of writing this article, React Native is far more popular than NativeScript. According to npm stats, around 300,000 people downloaded React Native this week, while NativeScript was downloaded only by 10,000 people. On GitHub, React Native has 80,000 stars, while NativeScript has less than 20,000.
For those who have already built a web app with Angular, Vue.js or React, the choice between NativeScript and React Native is obvious: choose NativeScript for Angular and Vue.js, and React Native for React. Those who are building a cross-platform mobile app from scratch can choose either way without making a mistake, but there are several compelling reasons to lean toward React Native.