Introduction

Gravity Native is a complete mobile app template for both iOS and Android that enables you to build mobile applications faster than ever before, with no complicated native programming required.

The client is built using React Native and managed with Expo. This means you can build native mobile apps and deploy them to the app store using only Javascript and without ever having to touch a single line of native code.

Oh, there's also live reloading as well! So you don't need to continually rebuild your app to test every change.

About Expo

​Expo is a platform for building and managing React Native applications. With Expo, you can instantly develop and test native applications on your iOS or Android device. You don't need to wrestle with xCode or Android Studio – just use your favourite code editor and Expo will take care of the rest. Expo will even handle the complex build process for you, so all you need to do is upload your app to the app store.

About React Native

If you're comfortable writing React code for the web, you'll feel right at home with React Native. The project structure and syntax is exactly the same. The only major difference is that instead of using HTML elements like <divs> and <inputs> you'll be using mobile platform specific elements like <TextInput> and <SwipeListView>. Youcan even use CSS to style your user interface!

Gravity Native ships packed with pre-built components, so you can piece your app together quickly without having to learn any new skills. If you want to do some background reading, I recommend flicking through the React Native docs over a coffee to familiarise yourself.

There's a lot of components and APIs available in React Native for almost anything you will need, from making the phone vibrate to taking and editing photos.

Writing Code

Gravity Native uses the Expo managed workflow, which means the native parts of the application are abstracted and you only need to deal with Javascript code and a simple folder structure similar to a web application.

This is perfect for most applications, especially if you're coming from web development and you want to move fast without the steep learning curve of dealing with native projects.

However, you do want to write native code, you can eject from the Expo managed workflow and open your project in xCode or Android studio – although doing so can create new challenges, so I recommend working within the Expo managed workflow if you're new to React Native.

The following sections will give you an overview of how Gravity Native is set up along with explanations on how to use each of the components.