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.
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
GitHub
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 is more sought-after as entry into the world of mobile app development is the easiest. You can have a simple knowledge of JavaScript and start developing a mobile app. Xamarin is associated with a knowledge of C# programming language. Since the C# paradigm is very similar to Java/Objective C, Xamarin is more popular with those developers who are familiar with native iOS/Android.
- 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.
"
The consumer mobile app was a huge endeavor because we had to transition the entire team to React Native.
Gabriel Lew, Senior software engineer at Bloomberg
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.
“
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.
Airbnb Case
- 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.
"
The most important feature of Xamarin is it's ability to take advantage of Objective-C and Java android libraries.
Slawomir Grycz, CEO In'Sanelab
Xamarin metrics 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.
Looking Forward: EGO Creative Innovations Case
At EGO Creative Innovations we have chosen to develop all our cross-platform apps with Xamarin and, since 2011, we have used Xamarin and been very happy with it! It might not be highly promoted with intensive marketing efforts, and there are fewer developers with the knowledge of C# than JavaScript, but clearly, it is the most mature cross-platform framework and it offers a wider range of technical abilities. It’s more stable and reliable in the long term, simply because it doesn’t have the issues that React Native has.
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!