Newby Coder header banner

React-native Setup


Install React-native in Linux/MacOS

React-native apps can be run using Expo or react-native cli

NewbyCoder.com uses react-native cli

Because native code is not built when using Expo to create a project, it's cannot be used to include custom native modules beyond React Native APIs and components that are available in the Expo client app

Expo

Expo is a set of tools built around React Native

It can be used to write and test an app

Requirements

Running Online

Snack is an online tool, which allows to write and test app in a web browser

It also has features like

Install in Linux/Ubuntu

React Native CLI requires Android Sdk

Install Android Studio

Download Android Studio from https://developer.android.com/studio

Extract to a folder, copy-paste android-studio folder to a desired directory

Here its pasted to ~/android-studio (which is also /home/izaku/android-studio

Start android studio like

~/android-studio/bin/studio.sh

Choose a "Custom" setup when prompted to select an installation type

Make sure the boxes next to following are checked (in case unable to, these can be installed later) :

Install the components

Install Android SDK

Building a React Native app with native code requires the Android 9 (Pie) SDK in particular, which can be installed through the SDK Manager in Android Studio

The SDK Manager can be accessed from one of following