What is React Native and how has it changed your life?

There used to be 2 main ways to build an app that could be distributed via Apple and Google’s app stores: either natively, with 2 code bases – e.g. Objective-C or Swift for iOS and Java or Kotlin for Android, or cross-platform with something like Xamarin or a web app in a wrapper  like Ionic / PhoneGap.

There are pros and cons to both approaches. Developing a 100% native app is more expensive and you have 2 different code bases to maintain. However, native iOS and Android developers will typically tell you that any middleware type approach to app development will result in poorer user experience and performance and that pure native is the only way to go. I used to use the same argument.

With the continued annual release of more and more powerful, performant smartphones, I do not think the argument against building mobile apps in JavaScript due to performance restrictions is still valid.

My feeling nowadays is that when selecting the right technology to develop your next mobile app forget going with two 100% native codebases. All businesses expect their apps to work on both iOS and Android devices. So, it makes no business sense to start a new mobile project with separate code bases. It’s too expensive, too much effort to keep both codebases in sync and your users simply don’t care about code purity!

Really, the question should be which cross-platform solution should you choose?

There’s Microsoft’s Xamarin, Google’s Flutter, Cordova’s Ionic and Facebook’s React Native.

Having been recognised as one of the top five mobile experts in the world, our software engineers would naturally be looking to me to make the right long-term choice for our business and our clients. For me, React Native was the clear winner and since making that call our mobile development team have never looked back.

Like the competitors I’ve mentioned, React Native is a mobile application framework where you code in a single code-base and the exported result is 2 apps – one that will run on iOS and one that will run on Android devices.

However, one key difference between React Native and a technology like Cordova/Ionic is that with React Native you end up with 2 native apps, not just a web app wrapped in a single native view.

You’re coding views, labels, text fields etc in JavaScript or TypeScript and then the React Native framework creates native Objective-C and Java user interfaces by bridging your JavaScript user interface code and rendering native views in both platforms.

Code bridging to native code is not unique to React Native. However, there are a host of other reasons I chose React Native:

React Native’s architecture is based on React. React the most popular fully-featured web framework (for building websites and browser-based apps). Matchbox is not purely a mobile development agency. We build web applications and portals as well as native mobile apps. Taking our existing in-house knowledge of building React websites and combining that with our extensive experience of building native iOS and Android mobile apps has been a surprisingly easy transition to make.

Personally, I’ve been blown away by the performance of React Native on iOS. The team are currently in the middle of developing a large holiday-hunting app and custom gestures and animation handling in React Native feels just as fast as if they were building in Apple’s Swift.

Additionally, I am told, they find React Native’s layout and styling engine so easy to work with and so flexible! They’ve worked with all of Apple’s layout engines over the years from Springs & Struts to the horrors of Autolayout. These tools just never really mastered layout technology.

Originally launched in 2015, as is their nature – Facebook’s moved fast and broke things in their development of React Native. I’m not sure I’d have asked the team to go with React Native a few years ago and had to keep up with all the breaking changes. However, I feel now is the right time. React Native has stood the test of time and matured.

If I were to ask the mobile team to develop an iOS-only app from scratch today they would certainly choose React Native instead of Swift – and that’s from developers with 5 years Swift experience! But that’s a testament to just how impressed the’ve been with the technology. Cheers Facebook!

What should a user notice about your React Native app versus a truly native app?

Honestly – they shouldn’t notice any differences. Well… to be on the safe side I’d recommend they choose Matchbox Mobile as their tech partner if they haven’t already 😉

Are certain types of apps more or less suited to React Native?

I honestly can think of very few apps where I wouldn’t choose React Native as a starting point now. 

React Native even takes the pain out of having to remain backward compatible with old versions of iOS as it by default is backward compatible with iOS 9 out of the box! 

How does React Native change the long-term maintenance story?

To my knowledge, there’s no magic code conversation tool capable of automatically converting a legacy native iOS or Android codebase into a single React Native project. So, there would be some upfront cost incurred by a client looking to centralise multiple legacy codebases. However, these early costs could be reclaimed by the time (and money) saved when adding new features once to a single React Native codebase.


C
The Author

Chris Tait

Managing Director
Chris has worked on digital initiatives since the dawn of the commercial web, helping businesses recognise the opportunities for rich interactions with their...
View Bio
Chris Tait