A Quick Start to React Native
井民全, Jing, mqjing@gmail.com
Back to M.E.A.N. Main Page
Environment
Ubuntu 17.04
Step 1: Install Packages
- sudo apt-get install git
Step 2: Create React-Native app
Command
sudo npm install -g create-react-native-app
Step 3: Create a new project
Command
create-react-native-app AwesomeProject
E.g.
Step 4: Start the dev. Server
Command
cd AwesomeProject/
npm start
IPhone Site
Step 1: Install Expo
Step 2: Scan the QR Code
Fig. The default text shows on iPhone.
Step 3: Start Coding.
Commnad
vi app.js
[Server Site] vi App.js
[Server Site] npm start
[iPhone Site]
Expo
Failure Case
If the server does not running, your iPhone will show an error message like this.