React Native, the Future of Cross Platform Development?

Sep 11, 2017 9:05:00 AM

shutterstock_405891409.jpgEver since iOS and Android established themselves as the two dominant mobile platforms, app developers have had to make a choice: If you’re going to create an app with both Android and iOS versions, which do you work on first? “Both” has never been a viable option, because developing for each platform is sufficiently different that precious little code can be shared between the two. This means that app development takes twice as long as it should, sometimes longer. In an environment where speed to market can determine commercial success or failure, this state of affairs is a major handicap.

Although some attempts have been made at cross-platform frameworks, the results have been less than satisfactory. Apps built with frameworks such as Cordova simply don’t “feel” like native apps on either platform.

Enter React Native

All that may be changing with the advent of the React Native framework. React Native is an open-source framework that is built on the same principles as Facebook’s React framework, which was designed to facilitate cross-browser development of web applications. Like React, React Native uses Javascript to ensure consistent presentation and behavior of visual elements and controls between platforms, while also leveraging the look and feel that make the user experience in each platform unique.

At this writing, React Native is still in beta—a “version 1.0” has yet to appear. However, the community of developers has released regular evaluation versions, and many mobile app developers have given it a try. Reaction (pardon the pun) has been overwhelmingly positive.

Advantages of React Native

The advantages of React Native are not limited to the obvious benefits of true cross-platform development from a single code base. React Native helps developers in other ways as well:

  • A gentle learning curve. React Native largely avoids making developers learn a whole new set of syntax and conventions. If you know Javascript, you already know most of what you need to start using React Native. If you don’t know Javascript, getting into React Native is a good way to learn.
  • No compile step. Most traditional development platforms require developers to compile their code before testing it. Although compiling takes only a minute or so, it can be a real pain when you are trying only to tweak a few visual attributes, such as the placement of a button or field on a form. React Native eliminates the compilation step, so developers can make changes in the code and see the results immediately. You can even use the Chrome browser’s developer tools for more powerful testing.
  • Solid app performance. In React Native apps, the program logic and user interface rendering run on separate threads, so neither gets bogged down by the other. The result is an app that provides a pleasant user experience free from lags.

Downsides?

The downsides to React Native are few. Chief among them is that it is still in beta, and there are some bugs to fix and gaps to fill before it’s officially ready for production release. That said, one of the guiding principles of the React Native development team is overall system stability, and they have largely achieved this across each monthly evaluation release. And of course, they are doing their level best to make the framework as comprehensive as possible.

Of course, there are some gaps that may never truly be filled, because they are related to the fundamental differences in the iOS and Android architectures. Some features and behaviors in Android simply have no analogue in iOS, and vice versa. In these cases, app developers may be forced to write platform-specific code. Fortunately, with React Native these cases should be rare for most apps.

React Native appears to be bound for success, partly because of its dedicated development community, enthusiastic user base, and backing of major players such as Facebook and Instagram. And partly because at present there seems to be no better alternative. The future looks bright for React Native and the efficient development that it enables for truly cross-platform mobile apps.

Brian Geary

Written by Brian Geary

Brian is a true believer in the Agile process. He often assists the development process by performing the product owner role. In addition to his technical background, he is an experienced account manager with a background in sales and customer service, as well as graphic design and marketing. Brian’s role at AndPlus ranges from marketing to sales and everything in between. Brian brings 10+ years of design, marketing and account management experience to AndPlus.