XAMARIN VS REACT NATIVE
Tags: xamarin, react
Published: 2019-11-26 10:52:42

Full article: https://codeit.us/blog/xamarin-vs-react-native

People wonder why is there a Xamarin vs React Native comparison and why is this issue so popular nowadays. The answer is in the value that these 2 open source frameworks provide - cross-platform mobile development.

Some of the businesses rely mostly on the mobile experience of their clients, thus they need to create quality apps for both Android and iOS users. Naturally, when we talk about creating an Android app we require a developer skilled in Java, and for iOS - Swift or Objective-C will do. But there is a downside to that - the development time grows because of the need to create 2 apps. Let alone the fact that the Android team and the iOS team might implement the same feature completely differently. As we well know the tools you use to create an app for Android will not work for iOS app development and vice versa. For that reason, developers use cross-platform solutions including Xamarin and React Native. Brief information about each of them:

Xamarin allows creating one single application logic using C # and .NET. In this framework, applications can send requests to API interfaces on devices. When the visual interface is defined, the C # logic is attached, and the app works on both Android and iOS.
React native is a JS-framework based on JS and React created by Facebook. This is a rather young technology. Due to the fact that the version for Android appeared later, the one for iOS has more components. With React Native, you don't build a "mobile web app", an "HTML5 app", or a "hybrid app". You build a real mobile app that's indistinguishable from an app built using Objective-C or Java.
From the above-mentioned, it is easy to gather that in case your development team has experience with .NET it will be easy to work with Xamarin. And if JavaScript is nothing new to the team then React Native won’t be hard to handle.

Let's move to discuss both frameworks in more details with pros and cons. We’d like to say in advance - there is no “best option” nowadays, but there is a space for comparison.

XAMARIN
It is a rather young but progressive technology based on the Microsoft technology stack. With a C#-shared codebase, developers can use Xamarin tools to write native Android, iOS, and Windows apps with native user interfaces and share code across multiple platforms, including Windows and macOS. Forrester’s research found out that Xamarin reduces mobile app development and life-cycle management costs while optimizing the utilization of existing developer resources.
**Pros of using Xamarin**
1. Single technology stack. Xamarin uses C# and .Net framework to develop apps for any mobile platform. Thus, you don’t have to switch between environments and about 75% of the code can be shared crosswise.
2. Easy prototyping. Such tool as Xamarin.Forms provides developers with rapid prototyping. With it, one can create a single interface and share it across all platforms.
3. Native Experience in UI. Xamarin Studio and Visual Studio provide the mobile team with the specialized UI & UX design tools that allow creating flawless UI.
4. Integrated Testing Environment. Xamarin has a TestCloud tool that allows testing apps automatically.
5. Cost-effective development. Naturally when the developer does not have to develop an app for each platform but can use a cross-platform solution instead - it reduces the development time and cost.
6. Low maintenance. Updating and maintaining apps built with Xamarin is so much easier as there is no need to update features for each platform in case of new releases or bug fixes.

**Cons of using Xamarin**
1. Not all Open Source Libraries available. For now, the development team can only use components provided by the platform and .NET resources.
2. Not for heavy graphics.* The UI is usually more platform-based than the code, so the apps with heavy graphics might experience troubles. If the UI is rich it would be better to use native implementation.
3. Problems with 3rd-party tools.* It has been known, that developers often face a problem trying to integrate third-party solutions. So in case, there is a need to implement a specific integration that is not supported by the platform it is advised to go through compatibility guidelines.

REACT NATIVE
React Native is a JavaScript framework for writing real, natively rendering mobile applications for iOS and Android launched in 2015. It’s based on React, Facebook’s JavaScript library for building user interfaces, but instead of targeting the browser, it targets mobile platforms. Unlike Xamarin React Native creates UI indistinguishable from the native one. Some of the most famous apps like Facebook, Instagram, Netflix, etc. were created with the use of React Native.

**Pros of using React Native**
1. Big Community. React Native uses JavaScript - one of the most popular and used programming languages in the world. So the community is huge. Besides, it is an open-source framework meaning any developer can contribute to the framework.
2. Native-like performance. The “Native” in the name kinda explains it - the user interface is created with the help of native modules and widgets, and sometimes it is even hard to tell if the app is for example native iOS or built with RN.
3. Reusable code. In case a business has a web app that is written in React they can create a mobile app with React Native using a large part of that code.
4. One team for several apps. As with Xamarin, you don’t need “native” teams for both iOS and Android - React Native saves the day.
5. Reduce time and cost. For the reason described above the development time decreases twice and so does the cost. Of course, not every aspect of every mobile app can be created with the help of RN and there will be differences when creating some native iOS or Android feature. But still, in general picture, you reduce your spendings.

**Cons of using React Native**
1. Developers for native modules. At some extent, your development team might still need to write a minimal amount of native code during the app development. Thus there is still a need for native software engineers (Objective-C, Java).
2. 3rd-party components trouble. The list of third-party components that can be used with the React Native is not long.
3. Performance issues. Some might note that apps created with the React Native in rare occasions work teeny-tiny worse than the native ones.
4. Slower updates. As the technology is still young one can notice, that the SDKs updates fall behind the ones of Android or iOS.

As we can see there are a lot of similar advantages and disadvantages between the two frameworks. And to be honest currently, it is no point in asking which one is better. Xamarin market share is currently 20.22% with 271 websites. And React Native has 0.01% of market share with 1781 websites. The focus here must be on which one is more suitable for your development team and your business in general. More experience with JavaScript - React Native is the better option for you. Have been working for a long time with C# - we’d suggest Xamarin. Still, have no idea which one would be better? No problem - [leave it for us](https://codeit.us/contacts) to investigate.