Author: Erk EKİN, IOS SW Engineer – UX & Mobile Applications
With React Native, an experienced web developer can write Android or iOS apps at a much faster pace. This is a major win as it not only allows developers to leverage the same skill set for both platforms, but it makes porting from one to another a much simpler affair. In this post, I’ll be trying to share some of my non-technical insights on React Native of Facebook.
So why need a native solution to app development? I mean, why are hybrid apps so cheesy (does the exception proves the rule)?
Well, if you use smart phones on a regular basis, you get used to the flawless, fast user experience while using your smart phones’ built-in apps such as mail, phone, messages, photos etc. The built-in apps are all native, in other words they are developed essentially for one particular mobile device and is installed directly onto the device itself. Accordingly, the built-in apps are well-optimized for the device that is in your hand. These are first-party apps and are all developed by the same company that manufactured the phone itself. Since manufacturers want you to buy their device, these apps should be fast, responsive and reliable.
That is all to say, once user gets accustomed to the smooth experience of built-in apps, the same expectation rises up towards the third-parties as well. We expect the same speed as well as the same design from other apps on mobile application markets. However, hybrid apps are inherently web pages in a browser, therefore they behave like a web page, not an app. A regular user will agree that even one tap on a button feels like a button click on a web browser. Even though, an experienced developer can make it ‘feel like’ a native app button, essentially it is not hard to distinguish a native experience and a web based one. We have economic, technical and security reasons to go native as stated here as well.
There are tons of start-ups or even big names of the software world that dive into hybrid app realm. Some are successful and some are not. The reason hybrid apps are popular is that software companies can make use of their web development skills to quickly build rich, fully native mobile apps and leverage any native platform API with ease. But as I stated above, those are web pages behaving like native apps, which should be considered separately. Native apps on the other hand, are quite powerful since they can access device sensors like the accelerometer, camera, gyroscope and microphone. Hybrid and web apps can also access these but in quite limited ways.
We used React Native in an internal project and finished it in a period shorter than expected. The result was impressive. We had one code base but two different mobile apps connecting to a server and consuming the same resource. We didn’t face any challenges during the implementation, it just worked. We’re now considering to use it partly, in our next apps.
The coolest feature that I particularly appreciated was rapid iteration, as opposed to change file → compile → run for typical native development. This is called hot reloading in React Native realm. The idea behind hot reloading is to keep the app running and to inject new versions of the files that you edited at runtime. This way, you don’t lose any of your state which is especially useful if you are tweaking the UI. Please see this video that is worth a thousand words.
I, personally, recommend developers who feel comfortable with a native language to take a look at React Native, get your hands dirty a little bit and you will see where you can get benefit from it in your regular development process; however, if you are a newbie, go and learn a dedicated platform first. React Native is not a silver bullet, it has advantages and disadvantages compared to a truly native coding. Especially those red error messages. This is my shout out to the FB team: Please make error messages more understandable.
Get ready to see job titles like “cross-stack engineer” soon.