ref – https://facebook.github.io/react-native/docs/getting-started.html
Install expo
npm install -g expo-cli
To create new React Project and run it
expo init SimpleApp
Then you’ll see a project is being created:
EPCNSZXW0324:testReactAppWithJest2 rickytsao$ expo init SimpleApp
There is a new version of expo-cli available (2.10.1).
You are currently using expo-cli 2.6.14
Run npm install -g expo-cli
to get the latest version
? Choose a template: expo-template-blank
? Yarn v1.13.0 found. Use Yarn to install dependencies? Yes
[11:39:06] Extracting project files…
[11:39:09] Customizing project…
[11:39:10] Initialized a git repository.
[11:39:10] Installing dependencies…
yarn install v1.13.0
info No lockfile found.
[1/4] 🔍 Resolving packages…
[2/4] 🚚 Fetching packages…
[3/4] 🔗 Linking dependencies…
warning “expo > expo-background-fetch@1.0.0” has unmet peer dependency “expo-task-manager-interface@~1.0.0”.
…
…
…
warning “expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-object-rest-spread > @babel/plugin-syntax-object-rest-spread@7.2.0” has unmet peer dependency “@babel/core@^7.0.0-0”.
[4/4] 🔨 Building fresh packages…
success Saved lockfile.
✨ Done in 108.84s.
Your project is ready at /Users/rickytsao/Desktop/testReactAppWithJest2/SimpleApp
To get started, you can type:
cd SimpleApp
yarn start
cd SimpleApp
npm start
Then in the terminal:
> expo start
At this point, you are starting expo and it will run what you have in the current directory.
There is a new version of expo-cli available (2.10.1).
You are currently using expo-cli 2.6.14
Run npm install -g expo-cli
to get the latest version
[13:11:22] Starting project at /Users/rickytsao/Desktop/testReactAppWithJest2/SimpleApp
[13:11:26] Expo DevTools is running at http://localhost:19002
[13:11:26] Opening DevTools in the browser… (press shift-d to disable)
[13:11:40] Starting Metro Bundler on port 19001.
exp://10.22.19.89:19000
…
you’ll also see a QR code image here
To run the app with live reloading, choose one of:
• Sign in as @rtsao6680 in Expo Client on Android or iOS. Your
projects will automatically appear in the “Projects” tab.
• Scan the QR code above with the Expo app (Android) or the Camera app (iOS).
• Press a for Android emulator, or i for iOS simulator.
• Press e to send a link to your phone with email/SMS.
Press ? to show a list of all available commands.
Logs for your project will appear below. Press Ctrl+C to exit.
[13:11:54] Tunnel ready.
A browser will open
On the left sidebar, under connection, “local” is selected.