Current Update and Use Cases for React Native
React Native is an open-source framework for mobile app development on both Android and iOS devices simultaneously. The project was initially released by Facebook in 2015 and has since grown to attract a large, vibrant, mature community of thousands of volunteer contributors. React Native is now one of the most popular open-source frameworks in use today, and the latest version—React Native 0.60—has just been released in July 2019.
Developing a mobile app for a single platform, iOS or Android, requires using a specific programming language: Swift or Objective-C for iOS, and Java for Android. Unfortunately, little of the work done on one platform can translate over to the other. This is one reason why developing an iOS app for Android (or vice versa) can be such a long and expensive project: it's essentially as if you are starting over from scratch.
Here at MightySignal, we help companies gain valuable insights and intelligence into mobile apps and SDKs to build smarter data-driven business strategies. One of our customers, the error monitoring and reporting platform Bugsnag, recently released a "State of React Native" study based on information that we provided. In this article, we'll take a look at the current update of React Native 0.60, as well as some business use cases for React Native and some important conclusions from Bugsnag's report.
What's New in React Native 0.60?
React Native 0.60 is a significant update, and users should think carefully about the pros and cons of upgrading to the latest version. In this section, we'll discuss what we believe are the five most significant additions to React Native 0.60.
Perhaps the most noteworthy adjustment for users will be the migration to AndroidX, which is a breaking change for React Native 0.60.
AndroidX is an open-source project for Android development and testing that delineates which packages are bundled with the Android operating system, and which are packaged with your app's APK. The names of packages in AndroidX begin with the "androidx" prefix, while the "android" prefix is exclusively for Android packages that ship with the operating system.
React Native developer Ryan Turner has stated that for version 0.60, "your native code and dependencies will need to be migrated" along with the React Native framework. Fortunately, the project's contributors have built an AndroidX transition tool called jetifier.
CocoaPods is a software application that manages third-party library dependencies for programming languages such as Swift and Objective-C, which makes it an invaluable tool for iOS developers.
The iOS side of React Native now includes CocoaPods by default. According to React Native developers, users should now open their iOS platform code using the "xcworkspace" file.
Digital accessibility is the design and development of digital platforms, such as websites and
mobile apps, to be usable by people with disabilities to the maximum extent possible.
People with disabilities have many different ways to use a smartphone and a variety of experiences when doing so. The goal of accessibility-centric development is to acknowledge these different experiences and look for ways to improve them.
For example, people with visual disabilities may use screen reader software that converts the text on the screen into synthesized speech. React Native 0.60 now includes the AccessibilityInfo.announceForAccessibility function that will cause the screen reader to read the string that is passed into the function.
Other improvements to accessibility with React Native 0.60 include adding missing roles, extended accessibility actions, support for accessibility flags and reduce motion on iOS, and a new Accessibility States API.
WebView, NetInfo, and Geolocation
The React Native development team has been focusing on a project called "Lean Core" that will clean up the repository and remove outdated and legacy code. With 0.60, developers have now migrated WebView and NetInfo out of the React Native repository.
In addition, Geolocation has been extracted as a result of changes to Apple's App Store policy, which requires all apps that access user data to include a purpose string explaining the need for this data.
Autolinking is a new feature in React Native 0.60 that enables projects to discover iOS or Android platform-specific code automatically. This removes most of the need for developers to use the "react-native link" command.
React Native: Current State and Use Cases
React Native development is ideally suited for situations where you need to develop both iOS and Android mobile apps on a lower timeline and budget. In particular, companies that already use React for their website will be able to migrate much of their code into their React Native mobile app.
According to Bugsnag's "State of React Native" report, more than 70 percent of React Native users are developers from the U.S. for both iOS and Android platforms. This trend is also reflected in the user base: Americans are the largest consumers of apps built with React Native, and also much more likely to use apps that are made in the U.S.
The good news is that React Native apps tend to perform well with audiences: 70 percent of both Android and iOS apps are rated 4.0 or higher, and 14 percent of iOS apps have been downloaded at least 100,000 times.
MightySignal's data also helped Bugsnag find several interesting points of discrepancy between Android and iOS apps. For example, 12 percent of iOS apps offer in-app purchases, compared with just 5 percent of Android apps. To find out all the details, visit Bugsnag's website to download the full report.
With all that said, what are some ways that companies are using React Native?
Facebook, as the creator of React Native, naturally uses the framework in several ways throughout its codebase. For example, Facebook has converted the Events Dashboard in the iOS Facebook app to React Native. After the conversion, the loading time of Facebook's Events Dashboard was shortened from two seconds to just one.
Instagram, another Facebook product, also makes use of React Native throughout the app. Use cases for React Native in Instagram include push notification settings, edit profile views, and the list of saved posts.
React Native 0.60 is a significant step forward for the framework. While it should require a bit of tinkering on the part of users, upgrading to React Native 0.60 seems to be well worth the effort. It's no wonder that Facebook, Uber, and thousands of other companies are using the React Native framework.
Want to learn whether your favorite mobile app is using React Native or any other SDK? Bugsnag and other customers have used MightySignal to break down mobile apps into their component parts, gaining valuable insights into how the app has been developed. Get in touch with our team today to learn how we can help.