In the age of smartphones and tablets, every mobile app developer is seeking the fastest, cheapest, easiest ways to develop and deploy highly performing apps. iOS and Android rule the market and, as a mobile apps developer, you have to choose the most appropriate framework to run your app on more devices and provide the best user experience.
Let’s be objective and compare two open source cross-platform frameworks — Xamarin vs React Native. We are excited to take a closer look, especially as Xamarin.Forms 3.0 has just been released a few months ago.
Statistics or how big is the pie?
Stats combined ReactJs and React Native, as ReactJS is the core of React Native. We used it as a relative basis for comparison though, from the technical point of view, ReactJs and React Native are not the same thing.
As of 2018, and based on statistics from the StackOverflow Community, both React and Xamarin are in the top ten of the most used and loved frameworks. According to the 69,000 survey respondents, React is three times more highly used framework among developers worldwide than Xamarin (28.3% vs 7.4%). Node.js and AngularJS continue to be the most used frameworks in this category. Programmers could select a few options and, again, these stats offer not the best base for comparison, but the popularity trend is climbing up towards Facebook products.
Source: Stack Overflow Survey, 2018
Hype or great marketing and support?
Building a user community as well as providing direct support and direct communication with customers is key to growing any business nowadays. Especially when we are talking about geeks who spend their lives online. We analyzed the data of the React Native and Xamarin online communities. Let’s see who is winning in this field.
We will compare the communities in GitHub and Reddit:
The number of repositories, users, contributors, and commits is roughly twice as big for React Native than for Xamarin. Facebook succeeded in its efforts to develop a highly active React Native community on GitHub. Numbers are talking for themselves, see the screenshots below.
The React Native community is very active and greatly developed on another specialized developers’ hub — Reddit. The number of active members in the Xamarin community is six times less, 14.6k vs 2.4k.
We would say that Microsoft focuses on developing the Xamarin customer community and provide support in their own forum.
React Native also has a large community of about 10,000 users on subreddit, 7,000 users at Discord chat and very strong support on Stack Overflow. Xamarin can boast 4,700 users in their Slack community and a great support on Stack Overflow, too.
- Google Search
Google Trends shows that both Xamarin and React Native are highly googled with a slight difference. Geographical interest in both frameworks reveals no competition since it is really divergent. React Native is mostly searched in China, Hong Kong, Vietnam, and Israel. Xamarin is more popular for Googlers in Mexico, Saudi Arabia, Italy, and South Africa.
Let’s get technical!
There are so many comparisons of the technical advantages and disadvantages between React Native and Xamarin available on the Internet. Let’s summarize them in the table below.
React Native: pros and cons
- React Native does not require special tools to develop your apps, unlike Xamarin where you have to be equipped with Visual Studio. But we think that, sooner or later, you will need emulators like Android SDK or iOS XCode. It is disputable where tools are integrated better, so we can’t univocally assert that the requirement to use Visual Studio makes Xamarin lose a point in favor of React Native.
- There is an opinion that Xamarin offers more development tools and opportunities, while React Native has a minimum set of tools and works with native not directly but through a ‘layer’. It has the same limitations as Xamarin.forms. You can relatively quickly develop a simple app with low UI requirements, but it will not be as good as Xamarin for more complicated tasks with a customized UI and sophisticated functionality.
We think it’s the same story as with Xamarin.Forms. Software developers just refuse to believe the potential extendability. Contrary to how developers used to think in its early stages, this framework has become better with new releases. The same goes for React Native, and we are sure that once a software developer learns how the platform is scaled up with native components, he will not feel as restrained with framework limits.
- One of the largest React Native cons is it does NOT support all native features in iOS and Android. Of course, you can solve this issue and make everything compatible, but if there is no ready plugin available, you will have to write separate both in Java and Objective-C. In Xamarin’s case, everything goes with C#.
- React Native is not really a mature framework. It works well in most situations, but there are always unexpected bugs that take anywhere from hours to days to solve. Immaturity progresses very fast along with framework development.
Airbnb Case: “Due to React Native’s immaturity, we needed to patch the React Native source. In addition to contributing back to React Native, we had to maintain a fork in which we could quickly merge changes and bump our version. Over two years, we had to add roughly 50 commits on top of React Native. This makes the process of upgrading React Native extremely painful.”
- The React Native open source or third party libraries with native bridges (maps, video, etc) require knowledge of multiple platforms. Most library materials were written by people with experience in only one platform, resulting in inconsistencies and bugs on Android or iOS.
- React Native for Android is NOT compatible with third party 64-bit libraries. This issue has been known and ongoing since 2015. Hopefully, it will be solved in forthcoming releases.
- Developers report that refactoring in React Native is a nightmare. To make life worse refactors break in production at compile time.
- React Native gets frequent monthly releases. Of course, only a few releases bring crucial changes, but you will need to wait for open source libraries to catch up with the updates.
- Multiprocessing is not easy in React Native. Be ready that your app won’t be the fastest one.
- Both React Native and Xamarin effect the app size. Keep that in mind!
- There is no memory sharing between native and JS. Developers reported that all data should be serialized into JSON on its way in, and deserialized on its way out.
- Initialization time takes a few seconds in React Native, so no launch screens are required. It is possible to get a solution for this issue, but it will require time and effort from your team.
Xamarin: merits and disadvantages
- Xamarin apps are reported to be heavy and take a lot of space on devices. They are larger and heavier than native apps. It’s quite a disputable statement. Regarding size, neither Xamarin nor React Native can offer significant advantages, as they are mostly related to a particular project and its team solutions.
- Some software engineers complain that Xamarin’s main drawback is that it has NO shareable or reusable modules and components outside of Xamarin and that you can’t use the Xamarin framework for any iOS or Android app due to different incompatible programming languages used on mobile platforms. This is not really true. Xamarin offers NuGet packages, which actually serve as reusable modules.
- UI issues. UI development shall be provided for each platform in the case of Xamarin Native. Xamarin.Forms allow you to write UI once both for Android and iOS, but there are still some limitations.
- Xamarin provides amazing centralized support on their own corporate forum. It is confusing to look for things in other popular developer communities.
|Pros||● It’s the most native!|
● Individual UI for different platforms
● C# library
● Great for apps that rely on using native APIs heavily
● Leverage of NUnit (amazing framework for unit tests, native to C#)
● Profiler to check iOS app performance
● Easy for MVC and MVVM patterns
● Amazing support!
● Learn once, write everywhere
● Live updates (apps can be updated with no reload to App Store. Note: Apple wants to shut this door soon)
● No additional media required, like Studio
● Many third-party libraries
|Cons||● Visual Studio is a must, IDE cost is $539/user (professional annual license)|
● APIs have to be updated to support the latest iOS/Android SDKs
● UI development for different platforms (Xamarin Native)
● Heavy linking of codes and referencing between .NET frameworks and iOS/ Android/ Windows
|● NO stable version|
● NOT good for apps that rely on using native APIs heavily
● Does NOT support all native features in iOS and Android
● NO official APIs: camera, Bluetooth, biometrics, NFC, sensors
● UI/automation testing sucks
● React Native for Android is incompatible with 3rd-party 64-bit libraries
● Refactoring is VERY difficult
● 3rd party libraries can’t catch up with frequent RN updates
● NO multiprocessing supported
● No memory sharing between native and JS
● React Native effects app size
● Long initialization time
● Requires MUCH time on debugging
|Pricing Comparison||Open Source||Open Source|
|Big Brand Users||Slack, Bosch, Honeywell, Pinterest, Kellogg’s, DuPont, Kimberly-Clark, 3M, Alaska Airlines||Facebook, Instagram, Uber, Tesla, Skype, Bloomberg, Walmart, Pinterest, Wix, SoundCloud, Vogue, JD|
Looking Forward: EGO Creative Innovations Case
We are not advocating Xamarin as the one-and-only greatest tool, but it’s definitely a better choice for a long-term run in comparison with React Native, as there will be less sleepless nights for developers in terms of refactoring, etc. Besides, Xamarin Android is VERY similar to native Android Java code and will be a win-win for those teams focused on Android apps.
As you can see, both Xamarin and React Native frameworks continue to improve and grow their communities and solutions. Both have their advantages and disadvantages. If you want to develop something fast and simple, you should use React Native. But if you need a customized multifunctional Ferrari, and for a low price – go for Xamarin.
If you are still confused about what to choose – Xamarin or React Native – or need more information to decide on the best framework to develop your app and make it shine, contact our EGO experts. We will be happy to help!