Why React Native?

Yes, that’s the question I will try to answer here for those who intend to enter the world of Mobile Development. First of all, I must say for clarification that in this article I’m not going to explain what React Native (RN) is or how it works (at least not deeply), there are plenty of posts out there which already talk about that, I’m just going to show you why you should at least start looking it side eyed and why I consider it is the best alternative for developing native apps. Oh, one last thing before I start. This article is not about comparing Native Apps vs Hybrid Apps. No, this is all about Native Development and explaining why RN seems to be the immediate future. Now, let’s begin.

First things first: React Native is not an hybrid framework!

I’ve seen many publications which refer to React Native as an hybrid development tool. I must admit I understand the reason, is natural for people that when they listen about developing Mobile Apps for Android and IOS in Javascript (or actually anything that is not Java, Objective-C or Swift) to have them related with hybrid development. The trick here is, that React Native apps experience is, as it’s name says, native. As a difference with Hybrid Apps, which are basically HTML, CSS and Javascript code running in a webview, RN components are mounted 100% natively. When navigating in a Native App, you wouldn’t be able to tell if the app was developed with Java, Objective-C or Swift, or with RN.

So, even if we are not coding in the “native languages” of each operative system, the experience is completely native, so it’s not right to say that React Native is an hybrid framework.

Okey, show me what you have

Alright, it’s a native framework, but why should you choose it against the “natural tools”?

This are the two main advantages of React Native that will make you reconsider the old ways:

Code once, run twice: when developing with React Native, you write Javascript code that runs both in Android and IOS, so you will be developing for both operative systems simultaneously. From this, we can highlight two must-go opportunities: not only the duration of the project will be remarkably less, but also that just having Javascript skills will be enough, there is no need to know Java, Objective-C or Swift. Yes, you hear well. You will develop Mobile Native Apps in a considerably short time and all you need are JS developers. You should realise that in terms of maintainability, this is a big win. Each functionality, design update, bug, or whatever you want or need to change, you will only have to deal with it once instead of twice in separated platforms.

Note: this doesn’t mean that if you choose RN you won’t even meet our beloved friends Xcode and Android Studio, some libraries require native configuration. But I can assure you, you will manage to get over this “obstacles” without having to learn any new programming languages. But sadly, yes. As I said, you will probably need to use Xcode for one thing or another, so at least for now, you still need a Mac for making IOS apps.

Faster and easier deployments: as I said, RN is basically Javascript code running on the devices. So, what if instead of saving the JS code locally you could store it remotely and fetch it every time you need it? In case it doesn’t seem obvious, this way when you need to make an update, all you’ll have to do is deploying the JS code, and the changes will be reflected in the apps immediately, skipping the steps of re-compiling and Google or Apple reviews. I think this advantage of RN is not very well known, and for some companies the re-compilation might not be a big issue, but for others certainly is.

In case you don’t believe that any of this is possible, I recommend you to take a look at AppHub or CodePush.

Wait a second, are you saying that the common mobile development ways are dead?

No, absolutely not! As amazing it may sound to develop Mobile Apps with Javascript, in the deep, React Native is made with the “native languages”, so it would be paradoxical to say we don’t need them any more. All I’m saying, is that if you are about to start a new mobile project (either a big one or a small one), RN should be definitely your first option.

Unfortunately, this technology is still very young, so for the companies with more traditional approaches, it may be more reliable to use frameworks with more support and community. But for those who are looking to innovate and ready to take the leap, React Native is my advice.

I wrote this article based in my own experience and opinion, I can’t bring here any absolute truths. I hope you’ll find it useful and any critics and comments are welcome!


Why React Native? was originally published in DevBorn on Medium, where people are continuing the conversation by highlighting and responding to this story.

javascript
react
ios
android
react-native