DEV Community

Cover image for When to use React Native vs Native (Kotlin, Java, Swift, Objective-C)
Yaro Bagriy 🚀
Yaro Bagriy 🚀

Posted on

When to use React Native vs Native (Kotlin, Java, Swift, Objective-C)

Introduction

In today’s mobile ecosystem there are two major players, iOS and Android. One one hand, this is great for users because it gives them choice on what operating system they want to use. On the other hand, this is a huge problem for companies with mobile applications. The problem stems from exactly what the user benefits from, having more than one mobile operating system to choose from.

Applications for iOS are fundamentally written differently than applications for Android. Of course, the business logic is the same and the UI is similar, but the code that the apps are built on are not. Android apps are either written with Kotlin or Java, and iOS apps are either written with Swift or with Objective-C. Companies might see this as a problem since they would essentially need to write and maintain two different codebases. Potentially doubling development time, doubling the amount of total bugs, and managing twice the team size. In the end this costs the company more capital.

Since the inception of iOS and Android there have been many attempts to create a common abstraction to solve the double codebase problem. Some of the more popular abstractions include Xamarin, PhoneGap, and React Native. Now these abstractions are not silver bullets. A company should understand when to use such abstractions and when to stick with writing a native app. This article will do in depth on when to use React Native specifically.

What is React Native?

React Native is an abstraction that allows mobile applications to be developed with Javascript. The framework was developed by Facebook to enable easy cross platform mobile development. This essentially means having one codebase for both the iOS and Android applications. Over the years React Native has been gaining popularity among its peers and has proven itself to be a solid abstraction for any company to utilize. It especially integrates well with web applications written with React due to it’s similar language and structure.

Image description

React Native is by no means a silver bullet and will not fit every application. Any company looking to develop a mobile application should consider if React Native is the best option, and vice versa. There have been countless times where a React Native app would have saved the company time, money, and a lot of headache. The opposite can also be true, some applications are simply not made to be written with an abstraction layer. Below is a list of scenarios where one would use either React Native or Native. Read through the list and add checkmarks where the scenario applies. Pick the method If one has significantly more checkmarks then the other. If the numbers are similar, then either or would work well.

When to use React Native?

  • The development team has extensive knowledge using React.
  • The team is small with limited time and resources.
  • The app will look exactly the same with the same features on both platforms.
  • The app is relatively simple with no complex features.
  • The app has a web app component.

Examples of React Native Apps

  • Facebook Ads
  • Bloomberg
  • Walmart
  • Uber Eats
  • F8

What is Native (Kotlin, Java, Swift, Objective-C)?

Native development is the most raw form of building mobile apps. Building a native app means utilizing Apple’s or Google’s in-house technologies. These technologies include all of their core libraries which a developer would utilize to build out the application. Native apps are primarily written in Swift or Objective-C for iOS apps and Kolin or Java for Android apps. One of the biggest pluses about writing a native app is there is little to no risk involved in if the codebase will survive the test of time. Since native apps are built using in-house technologies, iOS and Android would need to disappear for the app to be non-existent anymore. Another plus is you don’t need to worry about if a third party changes and API or stops being supported. One big downside is that a separate iOS and a seperate Android app will need to be written.

When to use Native?

  • The app has a very custom UI.
  • The app requires the latest and greatest features by Apple and Google as soon as they are released.
  • The app requires the best performance possible (music and video streaming).
  • The app is any sort of game (2D or 3D).
  • The app used native features to the platform.
  • When you want something more to the core.

Examples of Native Only Apps

  • Candy Crush
  • Snapchat
  • Youtube
  • Spotify
  • Fitbit

Conclusion

Both native and react native apps are viable. There is no right or wrong decision. Yet the decision should not be taken lightly, since once you start, it’s difficult to switch. Feel free to contact me here and I'll help your business decide what path to take.

Top comments (0)