This article is intended for the people who want to create the mobile application for their enterprise or startup. If you are a founder, a CTO or a Consultant then you are most welcome.
In past 9 years, I have gone through all major mobile frameworks including iOS Cocoa, Android, Phone Gap, Titanium, Xamarin, Ionic and React Native for few hundreds of small, medium and large apps developed in our company.
As a consulting and development company, we have to fulfill customers demand of platform choice against requirement and IT budget.
Cross platforms are great to save time and bring consistency in the development of business apps and sharing a common code base.
Many clients recommend the stack for mobile apps without having a detailed understanding of the platform and at some point in time, they get stuck with the development difficulties presented to them to meet their requirement.
Requirements are changing in natural ways in Agile development, over several sprints, big changes come and many mentioned frameworks fail.
After gaining massive experience for success and failure on platform selection, we decided to go with React to a recent Traveller’s car booking app in Silicon Valley. We had to analyze two things:
- Pure Native
- React Native
Pure Native development is great in terms of performance and finding critical requirement solution. But while considering pure native for development applications, architects should consider several things like:
- If iOS app is estimated with efforts of 2 developers then android app also needs 2 developers, hence your budget gets 2x more.
- Code gets huge and separated as one app is written in Swift for iOS and one is written in Java for android.
- Consistency becomes a challenging task, if any design change encounter then it needs to be done in both iOS and Android with consistency. It also increases testing efforts and development span.
- Collaboration is required at an exponential level when new features are added.
- Tests to be written for each platform.
React-Native is a proven technology emerged from Facebook labs and is a great solution to above mentioned problems
- It allows to use one codebase for both platforms iOS and Android.
- Development speed is increased by 2x because every change done in code can be previewed immediately without restarting heavy simulators.
- Performance is very close to Pure Native apps.
- Entry for new team member becomes easy while in maintenance phase.
- Continuous delivery for small fixes becomes hassle free for small changes in production without submitting app overtime. Microsoft’s codepush is the library we use to handle this.
- 95% codebase is reused whereas only 5% is needed from native script in order to fulfil some sort of feature.
- React Native has good support to bring pure native component or code in it. So, developers can sort out critical module of project in pure native.
- Among all cross platforms, only React-Native can provide great animations to UI components because of Native compilation.
- One automation test runs on both iOS and Android.
- The beauty behind react native over other platforms is the global state management with Redux. We used redux to manage user’s journey data inside a Cart in a global store.
- Yes, the live preview as you code change is a great developer friendly feature of React development. It saves time by removing the necessity to load heavy simulators all the time. We use Decoide as our personal development editor choice.
React Native VS Ionic Framework
Both platforms are great but only one factor that makes React stand out over Ionic and Others is Performance.
@PerceptionSystem, we have done hands on experiment in IONIC and Xamarin for listing based apps and we found jerks while scrolling the list with photo and some text data. But it is only React Native which gave us “keep eyes open“ as it was loading so fast in Android and then we finally decided go in deep with React Native.
React Native is maintained by Facebook whereas Ionic is maintained by Google both are great companies to contribute these platforms.
Redux adds beauty to design pattern with global state management. On the other hand, IONIC is a web view based renderer library — it means your app is loaded inside webview.
Companies using React Native
There are many companies including
- Facebook uses for Ads manager app
- Airbnb uses for travellers app
- Discovery VR app
Our Best Practices with React Native
While, jest a lightweight library for testing helped to write & test unit tests. We captured 70% potentials bugs before every release cycle.
In react native, when your work with maps you will find issues and hurdles in android but if you stuck with it then you are gone. And same navigation issues in iOS, but our team overcame these issues with hardwork and great attention to design pattern.
For the hardcore video calling or photo editing app we would like to go with Pure Native.
React Native is for the startups of shopping cart, daily deals app like Groupon, car booking app like Lyft / Uber. For enterprise, apps for Logistics and Supply Chain, Fintech, Insurance, Manufacturing, Oil & Gas & Public Sector.
It depends on your solution architect but we Perception System stick to react native and for the same, things are explained.
If you want to save 40% cost of development and time without sacrificing app performance then React Native is something you get started with us. Recommendation to all startups, and IT managers of corporate.