App development with React Native. Why does it make app development super easy?
Please remember NOT to call React Native a hybrid approach – it’s a brand new category. Let’s call this category for a start “JS Native mobile apps”. It can and will grow faster from now on. Read on to understand why.
In the world of mobile apps for years there has been a debate over Hybrid Apps and Native Apps. While Native Apps require separate codebase for iOS and Android to deliver solution for the target audience, Hybrid Apps allow to write one piece of code and deploy it on multiple platforms. Application performance is the only noticeable sacrifice. While Native App has the super smooth feeling to it, often required in some high resource hungry applications, the typical Hybrid App performs far worse in those situations and responsiveness drops.
The lack of super smooth feeling is ok though for content-oriented applications where not so many high-level calculations are necessary, but when there are going to be more sophisticated interactions, animations or 3D effects, it might be wiser to select Native as your preferred choice. It might double the price (you need to write the code for both iOS and Android, not considering Windows Phone and other platforms), but it seems money well spent.
Difference in responsiveness
How does Hybrid App work and why is it slower?
What is missing here is that WebView is just one of multiple iOS components – please take a look at diagram 1 below showing how many different components are available in iOS. The same thing goes for Android and other platforms.
Diagram 1 – The WebView component is just one of multiple iOS components.
OK, so what’s great about React Native?
So it runs the native code, but is it better than Swift?
- React Native allows to live reload your app, change a bit of your code and see results in ‘real-time’ on your phone. “Real-time” seems appropriate, because there is an event live-reload option in Nuclide (Facebook’s code editor dedicated to react native), which reloads views upon saving the document. That is a huge help for developers and increases the speed of development (Swift requires recompilation of the code every time any change is made).
- The framework is flexible: you can, for example, still use Objective C or Swift code if you need in some iOS specific scenarios, if you want to.
- You can push your changes to the App Store without the review process using tools like AppHub or Microsoft’s CodePush.
- You’re not forced to write your code in Xcode. Apple is doing a great job, but still people have various preferences and especially when writing code for multiple platforms. Developer do not need to switch between text editors and even computers: all development can be made on a PC, while running the application live on an OSX, iPhone / iPad, Android device, etc. And again, all those devices will reload themselves instantly when the code is changed and the file is saved on the development host.
Learn Once, Write Anywhere
Learn once or write once? Learn! You’ll still need to write some parts of the code that are platform specific. But it’s very easy with React Native. On the contrary when you develop iOS apps, you need to write the Android app completely from scratch.
Deployed on Android and iOS.
The new category: JS Native mobile apps
So again, please keep in mind not to call React Native a hybrid approach, but for a start “JS Native mobile apps”. Now you have read this article, hopefully you will understand why React Native will grow fast and probably soon will called the de facto standard for app development.