Langley Foxall React Native

Introduction

React Native is a mobile framework developed and maintained by Facebook that allows the developer to develop apps for Android and iOS simultaneously. React Native generates an Android Studio and Xcode that will automatically bundle a JavaScript file that will control a majority of the logic and UI of the app on build.

An open source toolchain called Expo has also been developed around React Native. Expo removes the requirement for prerequisite knowledge of Android and iOS development. Having only a JavaScript file that a ReactJS app can be built using the exp command line tools or the Expo XDE application. The JavaScript file is bundled and delivered over the air to the developers device or simulator running the Expo app. Note: You are required to download the Expo app and create an account if you wish to develop this way.

Both Pure React Native and Expo applications can be built mostly like a regular ReactJS Application and most Node Modules will be compatible. A notable exception to this is Routing and Navigation. See recommended packages.

Getting Started

Which should I use?

Below is be listed the recommended prerequisite knowledge for each platform as well as the advantages and disadvantages. Use cases where Expo cannot be used will also be listed below.

Expo

The Expo SDK only requires a Web Development skill set as all code written is in JavaScript. This allows basic applications to be built quickly, and cross platform.

To see what Expo is capable of and for the quick start guide visit the Expo documentation.

Prerequisite knowledge

Advantages

Disadvantages

*See Detaching for more information

Over The Air Updates

Expo has support for OTAs for apps that have been distributed to users through the app store, however there are numerous open issues regarding them on the Expo GitHub page and due to the fact that projects cannot be shared between multiple accounts the update requires access to the original developer’s Expo account.

It is not recommended to use OTAs at this time.

Cases where Expo cannot be used

Detaching

This refers to detatching an existing Expo app to add custom features. Detatching a project to build it can be used to circumvent using Expo’s build servers, which is recommended.

Expo has the ability to ‘Detach’ project to an Android Studio and Xcode project. This allows use of native modules such as Android and Apple pay and allows other native modules to be installed and linked to the project such as PDF Viewers.On top of this you can write your own native code and link it to the JavaScript code.

This is not recommended, detatching requires knowledge of Android and iOS build tools

If you want to use Native Code, chances are you will not be taking advantage of all of Expo’s features and extra unneeded overhead will be added. If you need features that Expo provides such as the Camera and the Gyroscope you will spend less time using Pure React Native and installing and linking those modules yourself than getting the detached Expo project working.

Pure React Native

Using pure React Native gives the developer more freedom than using Expo but requires knowledge of more programming languages and development environments.

Prerequisite knowledge

Advantages

Disadvantages

Quick Start

See the quickstart guide for information on setting up a project, writing code, installing modules and deployment.

Code Standards

To see the code standards please refer to the documentation for the respective languages.

Package Information Expo Compatible
React Navigation React Navigation is the de-facto React Native Navigation Package, already included by default on Expo packages. :heavy_check_mark:

Blacklisted Packages

Package Reason
React Router Flux Breaking updates and long standing issues .