Once upon a time, the people labored under the yoke of wired-only devices. For generations, the villagers only had one phone, and could only use the internet inside. It was a dark and primitive time. But one day, thanks to the work of wise wizards, the era of mobile innovations arrived.
Landlines gave way to cell phones, which, in turn, were replaced with smart devices, distributed by the wizard Apple, armed with iOS-based mobile applications. But the other wizards were not content to let Apple capture the entire village market share. Soon enough, the wizard Android arrived from the neighboring kingdom of Google, and offered the villagers a plethora of native apps. And the battle between iOS and Android app wizards (or developers, as they are called in some dialects) has continued for years.But the prophecy tells of a chosen one, who can end the constant warring. His name is React Native, and he shall bring peace.
Fairy tales are fun, but let’s move on. The idea of this article is to take a glance at the mobile app development process from the perspective of creating a cross-platform product. It means that your iOS app needs to work on Android and vice versa. There is no need to build two different applications. React Native is a tool that allows you to make app for both platforms.
Types of mobile app development
Suppose, you’re a forward-looking geek with a terrific product idea. You’re on the verge of launching your startup, but the choice of an app platform has not been made yet. As Shakespeare might have said if he were writing today “To Android or iOS?, that is the question” (Sorry Windows). In fact, you have the following options – to make two separate native products or one hybrid/cross-platform app. Each of them can be attractive in their own way.
Native mobile development
Since we have React Native vs. native app development in the header, we’ll lead with this. To create a native mobile product, engineers leverage a native-to-the-operating-system programming language – Java and since recently Kotlin for Android or Swift/Objective-C for iOS. The created application can work on the dedicated OS only. As a result, the product is distinguished by high performance and tailored-to-the-platform UX.
In terms of development, engineers get access to the device’s full feature set which allows for leveraging advanced functionalities (memory management, complex networking, etc.). On the other hand, the native approach means separate codebases for each platform. However, some native extensions enable code sharing, e.g. C++ libraries can be shared between iOS and Android apps using Java Native Interface on Android. Nevertheless, you should be prepared to increase your development costs almost twofold if multiple device support is needed.
Cross-platform mobile development
The major goal of the cross-platform development approach is to make an app working on different operating systems without much codebase change. In other words, engineers write code once and do not have to remake it on other platforms. Code can be shared by using specialized tools like React Native, Xamarin, Flutter, etc. Apple has also made a step towards cross-platform development by making Swift open-source and enabling it to compile code for Android. In the context of this article, we will emphasize the two most popular mobile platforms – iOS and Android. However, you should not forget about other options including Windows Phone, BlackBerry OS, Firefox OS, and others.
Another facet of multi-platform app development is the user experience. There are two main ways to make your app UX-wise – to leverage custom UI the same as you would on any platform (e.g., Instagram/Facebook) or to provide a dedicated UI for each platform which makes it easy for users to start using it. React Native supports both options because you can use React libraries to deal with platform-specific aspects or build custom UI components.
So, cross-platform apps are free of any OS hook. They offer seamless functionality, easy implementation, and cost-effective production. As for downsides, you should not expect outstanding performance and expansive customization, which is limited to the framework employed. When customization is needed, you’ll end up in the native-to-the-platform territory.
Hybrid mobile development
Ionic is a typical representative of hybrid development tools. This SDK leverages web technologies for most of an app. Native features are implemented via so-called bridges (PhoneGap/Cordova). As a result, users get access to camera or file storage to improve UX. In that regard, we cannot refer to React Native as a hybrid dev tool because it uses a native rendering engine (system-wide UI components), but JS code is responsible for composing them. Actually, Railsware has already made an evaluation of Ionic vs React Native for building mobile apps.
Major benefits of the hybrid approach include fast development speed and code reusability in different platforms. The reverse side of the coin is limited access to the device’s features. Besides, the app will suffer from sluggish performance and a suboptimal UX (theoretically, it is possible to achieve a great UX and navigation patterns from the visual standpoint, but it’s a challenge to put it into practice).
|Ecosystem||Swift/Objective-C (iOS) – Xcode IDE|
Java, Kotlin (Android) – Eclipse IDE, Android Studio
|Ionic, Ext JS, Monaca, PhoneGap, Onsen UI||React Native, Xamarin, Flutter, NativeScript|
|Rendering engine used||Native||Browser||Native|
|Ease of development|
|Libraries||Not much dependency on open source libraries and platforms||Highly dependent on different libraries and frameworks||Highly dependent on different libraries and frameworks|
|Debugging||Native debugging tools||Native + web development debugging tools||Complicated for React Native because there are two layers (and two languages) to go through: you start with JS and then you end up debugging Java code on Android or Swift on iOS. Other cross-platform SDKs like Flutter or Xamarin employ one language – Dart and C# respectively.|
|Codebase||separate codebases – one per platform||single codebase with potential platform-specific abilities||single codebase with potential platform-specific abilities|
|Examples||Any preset app in your OS||TripCase (PhoneGap), Pacifica (Ionic), MyKVH||Skype (React Native), PayPal (Titanium), Pinterest (Xamarin)|
With the framework launch, the number of naysayers began to decrease. At the time, developers thought that writing an iPhone app with JS would be terrific but highly improbable. Androiders’ were less skeptic because they’ve been waiting until Facebook make RN available for the most popular mobile operating system in the world so far. Nevertheless, the demand for multi-platform projects spurred a chain reaction, which consolidated React Native’s position in the industry.
React Native pros and cons
RN is no longer a new technology but a mature solution to build cross-platform apps. However, it can be both attractive and inappropriate depending on what your goals are. Below, you will find the benefits and flaws that characterize this technology.
- Single codebase
- Open source
- Web to Mobile
- Hot reloading
- Simplified user interface
- Smaller time expenses
- Development costs reduction
This is the main privilege of all cross-platform frameworks including React Native. Instead of building two separate apps, developers can reuse most of the JS code for both Android and iOS.
This attribute provides almost limitless capabilities for the framework improvement with additional features.
You can reuse plenty of RN acceptable components in other projects which is a substantial bonus to your endeavors.
The development time is cut, and productivity goes up due to hot reloading. With this feature, the app is kept running, and new versions of files that you edit at runtime are updated. Now, tweaking the UI is not accompanied by any loss of your state. An engineer immediately sees changes in the app.
Unlike native development where we need to build a sequence of actions within an app, React Native leverages declarative programming for creating a mobile UI. That approach facilitates bug detection.
With React Native, both the development time and time to market are significantly lessened. Instead of coding separately for Android and iOS, you save time due to the code’s reusability. Although you can’t share all of the code, your time efficiency will be extremely high.
This benefit follows from the previous one in the sense that the less time you spend on development, the smaller the budget you can make do with.
- Native API support
- Native Modules
- Native app interaction
Although RN supports the most used APIs, some specific ones or functionality are not available. However, native modules can be a solution to this issue.
The native-specified modules like camera access, push notifications, memory storage, device sensors, and others are the key to the above-described problem. At the same time, to take advantage of these parts of the code implemented in the native language, engineers have to possess expertise in this language. If you need to make something that is not available at React Native, you’ll have to learn Java/Kotlin or Objective-C/Swift to make the module for RN. So you still need to learn the native platform.
Each platform has a specific design language and navigation patterns – iOS has been stricter for a very long time, and Android is catching up with material design. React Native provides the automatic transformation of the graphical elements according to the required platform. However, there might be some placement issues. As a result, you have to dive deep into the code and figure out how to adjust the design guidelines.
Unlike native frameworks that ensure access to other native applications, React Native requires the use of third-party libraries or native modules to get that implemented.
Famous apps built with React Native
The best way to understand what React Native stands for is to know the products built with this technology. We have already put together a list of the best examples of React Native apps. Now, let’s take a quick look at the most famous ones.
Facebook Ads Manager
It would be completely unwise for Facebook not to have employed the multi-platform framework they developed for internal needs. And we know that Facebook is far from being an unwise company. Facebook Ads Manager became the first cross-platform application created with React Native. The technology allowed the development team to make the most of code sharing across iOS and Android, as well as cut platform-related checks to the bone.
The life of a modern celebrity is difficult to imagine without Instagram. That adds value to React Native vs. native iOS/Android development because this technology played a significant role in upgrading the Instagram’s mobile application. They refused from the WebView of the Edit Profile, the Photos Of, and the Push Notifications Settings views. The whole transition process was smooth and free of serious issues. Moreover, React Native allowed engineers to save their efforts due to significant code sharing (85-99% depending on products). The Instagram team has also discussed this experience in their blog post.
In 2017, Skype stunned global society with news of a new app characterized by a bunch of tasty features. It was referred to as an Android app at first, but then it came out that React Native was the technology used for the upgrade – which meant iOS would not be ignored. Today, Skype remains a Universal Windows platform app built on React Native. As for improvements, users report faster responsiveness and updated design. That is another victory for RN and one more advantage we can add to its scorecard.
Classcraft is a well-known educational portal where an ordinary learning environment is transformed into an amazing collaborative experience using games and technologies. The service has already had native mobile apps written in Objective-C and Java. React Native was chosen as a solution to cut maintenance expenses and improve the development cycle. Besides, the team wanted to optimize the way it transported new features from their JS-based web app into mobile (without rewriting business logic in the native languages). RN has been gradually implemented from 2014 till 2017 when the app core became an RN app hosting native and react views.
How React Native differs from native app development
We can’t claim that React Native is better or worse than native development. It’s absolutely different. And the way it differs can be crucial for your decision. Let’s take a look at some essential points in React vs Native face-off.
To build a native app, you could confine yourself to expertise in specific language and integrated development environment according to the OS for the application. With React Native, your domain knowledge should include JS or its syntax sugar JSX, as well as supporting tools for testing, debugging, text editing, etc. And API, of course, should be in this package. To sum up, RN is tightly linked with web development technologies that you’ll have to leverage for app building.
Development time and cost
If you’re making one mobile app for iOS or Android, the native approach is more productive despite all React Native’s advantages. However, we are talking about cross-platform app development, which requires additional resources in terms of money and time. In that case, RN is a super booster thank to code reusability. According to web sources, there are the following code reuse rates in some famous applications – almost 93% in Facebook, 85% in Skype, and approximately 86% in TaskRabbit. In practice, this means that development time, as well as costs, will be much lower.
Comparing Swift vs. React Native or React Native vs. Android IDE in terms of documentation is a tough task. Every software producer be it Apple, Google or Facebook apply huge efforts to deliver exhaustive documentation. Along with regular docs, each tech stack is provided with helpful prompts and code samples. Moreover, they are not novice but mature technologies. So, here we can state a draw between RN and native.
React Native has an ace in the hole – it can use React.js for mobile apps performance increase. As a result, all the best of React including DOM abstraction, increased app performance, simplified programming methods, etc. are at developers’ fingertips. The Native approach lags behind RN in terms of productivity, time to deployment, and flexibility of app development.
React Native boasts excellent performance. Due to native components for building UI, the framework performance is competitive with native apps. However, the bridge between the business logic, which runs in a single threaded JS environment, and the UI can cause some performance loss. Still, this issue is fixable if native processing of tasks is required.
React Native loses to native SDKs from the tech perspective. In other words, you opt for a cross-platform solution if some existing product needs to be improved or upgraded. Complex stuff including augmented/virtual reality, Big Data Mining algorithms and other sophisticated things require the power and technical abilities of native technologies.
Why should I choose React Native to build an app
Now, we come to the question “Is React Native the right tool for my next project?” Of course, a lot of details and criteria should be weighed to get a proper answer. However, you will hardly find a better solution for a cross-platform application. And here are some reasons why:
Code shareability across platforms
Native applications entail the burden of defining separate app logic depending on the OS. With React Native, you can forget about swinging from Android to iOS and vice versa. You write code for one operating system and share it on another one with some subtle adjustment. In other words, you accelerate your productivity almost twofold.
Better UX requires great UI
By leveraging the best of React.js, mobile framework puts an emphasis on refining the user interface to make it seamlessly integrated into the entire app environment. Hybrid apps fall behind React Native in loading speed which means approaching a better user experience.
Another attractive feature of React Native is the adequacy of human resources on the market. All your project will need is good JS developers with some React expertise – and you can start. Even a small team of engineers can handle a tough project with scarce resources.
Railsware’s cross-platform development experience
Railsware is known for its affection for Ruby and its framework Rails. Still, React Native holds an important place in our pantheon. For example, at the Ruby Meditation #17 conference, one of our engineers introduced his ideas and vision of this cross-platform technology from a Rubyist’s perspective. The topic of debugging React Native was also covered in our blog. We go with the tides which means leveraging the best technologies for production. React Native has proved its consistency and maturity. That’s why Railsware has opted for RN instead of native development. However, do not think that it is a matter of the comparison of React Native vs. Swift/Java. We count on efficiency and productivity. And that is definitely the focus area of RN. It prevents the differentiation of iOS or Android developers in the company; it is easy in employment and cost-efficient in support. Besides, Railsware has a long experience of using ReactJS in projects including Quorso, Smart Checklist, and others. A good example of our experience with the framework is creating a cross-platform app for Montessori Compass. React Native is an integral part of our technology fleet.
In short, React Native is an astonishing tool for mobile app building. It can be a perfect choice for enthusiasts who are aimed at multi-platform app without much complexity. If you have a small budget or a web development team, those are also the appropriate conditions to leverage the framework for your project. You won’t have to learn to love React Native since it immediately impresses you with its ability to accelerate app development by reusing code for different operating systems without sacrificing user experience.