Ever 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
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:
- 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.
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.