Create a React-Native Application using Expo
published on 2020-03-27
Installation (before create new app)
when you use Expo to develop application, there are two tools that you need: a local development tool and a mobile client to open your app.
1. Local development tool: Expo CLI
Expo CLI is a command line app that is the main interface between a developer and Expo tools. You can use CLI in your terminal or use the web based interface (it will pop up in your web browser dynamically when you run your project).
Pre-requisities
- Node.js: Before installing Expo CLI you nedd to install Node.js
Installing Expo CLI
npm install -g expo-cli
2. Expo client app for iOS and Android
Expo client is a tool that can help you to run and preview your project while developing it. When you run the project with Expo CLI, it will generate a development URL that you can open in Expo client to preview your application. Expo Client applies to physic devices, simulators and emulators.
Run it on physic device:
🤖 Download expo client here for Android from Play Store.
🍎 Download it here for iOS from App Store.
⚠️ The minimum Android version is Android Lollipop (5) and the minimum iOS version is iOS 10.0.
Run it on computer:
You need to install a simulator or emulator to run the Expo client app
. The instructions of iOS simulator is here. The instruction of Android is here
Create a new app
expo init My-App
: Initialize the projectnpm start
/expo start
: Start project
Open the app on your phone or computer
On android 🤖 :
1. open and enter Expo client app
2. scan the QR code you see in the termainal (press "c" to view it)or in Expo Dev Tools
Issue
If you have issues with Expo, please see issues covered in the Expo Docs or see some open issues here.
If you have checked the documention and open issues, the problem is not solved. You can ask question on Exop forums