NativeScript and React Native allow building multi-platform mobile apps. Which one to choose? If your team already built a web app, the choice depends on your tech stack. If you start from scratch, one of them stands out.
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.
But simply deciding to establish a mobile presence is just the first step because there is more than one way to reach mobile users.
Specifically, we are comparing NativeScript with React Native to see which of these two mobile app development frameworks for writing natively rendered mobile applications for iOS and Android has more to offer.
For a long time, native mobile apps ruled digital distribution platforms and marketplaces.
Developed in a platform-specific programming language, such as:
Platform-specific tools 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.
<span class="colorbox1" fs-test-element="box1"><p>Tip: 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. </p></span>
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.
For these and other reasons, mobile web apps have skyrocketed in popularity in recent years.
Unified development is by far the most important advantage of mobile web apps, but it’s not the only one.
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.
<span class="colorbox1" fs-test-element="box1"><p>Tip: 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.</p></span>
That’s where technologies such as NativeScript and React Native come in.
NativeScript was first released in 2014 by Progress Software Corporation. On its website, NativeScript describes itself as an:
With NativeScript, it’s possible to develop native mobile applications for Android and iOS from a single codebase and enjoy the native-like performance with 100% direct access to all iOS and Android APIs.
Some of the most popular apps created using NativeScript include:
Stephen Fluin, Developer Advocate for Angular at Google, says:
<blockquote><p>“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,”</p></blockquote>
Even Payne, Senior Front-End Software Engineer at Netcentric, echoes the same sentiment:
<blockquote><p>“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,”</p></blockquote>
Mark Zuckerberg famously said in an interview at TechCrunch Disrupt:
<blockquote><p>“The biggest mistake we made as a company was betting too much on HTML5 as opposed to native,”</p></blockquote>
Just like NativeScript, React Native can be used to create native mobile apps for Android and iOS.
React Native apps render native components and use the same native platform APIs as true native apps do.
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:
Fanghao (Robin) Chen, Mobile Lead at Discord, once said:
<blockquote><p>“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!”</p><p>“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.”</p></blockquote>
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.
<span class="colorbox1" fs-test-element="box1"><p>Tip: Developers who are already familiar with Angular will find it easier to use NativeScript because of its deep integration with the Angular CLI, router support, code generation, and more.Likewise, developers who are already familiar with React will be able to easily transition to React Native.</p></span>
Both NativeScript and React Native allow developers to write using:
However, if you create a new project in React Native you’ll notice that it uses Flow as a default, while NativeScript uses TypeScript. Of course, you can change that if you wish.
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.
<span class="colorbox1" fs-test-element="box1"><p>Tip: Both NativeScript and React Native can be debugged using Chrome Developer Tools, also known as Chrome DevTools.</p></span>
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.
When it comes to NativeScript, you can directly access all iOS and Android APIs without wasting time writing boilerplate wrappers.
<span class="colorbox1" fs-test-element="box1"><p>Tip: If you don’t want to write directly against iOS and Android APIs, you can choose from a wide selection of pre-built, open-source, NativeScript plugins, which are available on the NativeScript Marketplace.</p></span>
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 this week’s npm stats:
When it comes to GitHub stars:
The company behind NativeScript, Progress, has been doing a good job when it comes to making NativeScript better as a technology, but they don’t spend much money on marketing.
For those who have already built a web app with Angular, Vue.js or React, the choice between NativeScript and React Native is obvious:
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.
Get actionable product building tactics in your mailbox, monthly.
No previous chapters
No next chapters