Get ready for a whole new world of possibilities!

My Journey with React Native

As a web developer I have developed applications for the web platform for some time now, but was recently faced with a situation where I had to develop for a mobile platform. The android developer on our team was on leave and we were left with the two of us, myself and Ronnel, our IOS developer. Being a web developer my first choice was to go with Cordova or Phonegap considering its ease and earlier experience. So we patched up the app using Polymer and Firebase and put it to test with Phonegap. And as expected, the result wasn’t too exciting either. All the animations were choppy and the loading between pages took ages. So we sat down and looked at our alternatives. The first option was to get set up with Android Studio and do it the proper way, but then the learning curve was huge. So going forward with Android studio was clearly not an option.

React Native to the Rescue!

You will never take JavaScript down

Anyone with good experience working on a JavaScript development environment could get straight to it and get everything set up with in a few hours.

To begin with, by choosing react native as our development environment there would be less time spent in development when compared to Android Studio. Anyone with good experience working on a JavaScript development environment could get straight to it and get everything set up with in a few hours. And the best thing is that the code in the final build is a product that’s not a webview but a native, effecient app. React native was developed to meet three main requirements — simplicity, scalability and to be as fast as possible. What react native actually does is embed the JavaScript files in the app, and then runs them locally. In react native we can write JavaScript code but the framework will generate its corresponding native widgets, whether it be buttons or views or images. Like I said before there is no webview, instead our JS code runs in a thread that will create and destroy native widgets within the app.

Getting a good start

Setting up your development Environment should be done with utmost care. Get a good editor ready for writing your react native code. If you are concentrating solely on IOS development then Deco IDE is a good option with its preset widgets and other features. Another notable software is Expo which is an XDE which can help you get you started without Android Studio and its other dependencies.

Always test your build on an actual device than using an emulator. This is because an emulator can give you results which might not even come close to the case when you actually test it on a device. It can cause you to hog up bugs of all kinds, all along your development process and you might only notice this at very the last moment. So its better to test it with an actual device as you debug your build.

Because it is native!

If you are building for both Android and IOS platforms using react native make sure you do it concurrently. React native is mostly cross-platform, but there’s lots of little stuff like IOS and Android handling various components differently. One part that works perfectly with IOS might give you an error when you build it for Android. So make sure you take care of this scenario as well.

This one is very important, keep reading the official documentation for react native from the guys at Facebook. Any changes or updates to the framework is going to show up there first. So you don’t wanna be the last one knowing about whats happening with react native.

And the last thing chose a coding editor of your choice. Be sure that the said editor supports react native code snippets and other handy features. In my case I started out with Atom with a plugin for React native from Facebook called Nuclide. It is a pretty stable environment to get your work started. Other than that Atom also provides other plugins and packages that can be manually installed which can help with in editing your code. There are also other editors favourable for react native development like sublime text and brackets that also comes with various features.

The Conclusion

Its actually pretty awesome!

Best of luck for your further endeavours with React Native. Show some love if you liked this article and do feel free to ask your questions and doubts in the comments section below

Co-Founder, Professional UI/UX designer and Web developer www.ashiqmuhammed.com