Viewing your app on your phone
In order to view your React Native project on your device during development, we need to start the Expo development server:
- In the command-line terminal, make sure that you're in the project directory:
cd path/to/my-project
- Once you're in
my-project
, you can run the following command to start the development server:npm start
- This will show you some information about the developer server in the terminal:
Starting project at /Users/sakhniuk/React-and-React- Native-4th-Edition-/Chapter16/my-project Developer tools running on http://localhost:19002 Starting Metro Bundler ' Metro waiting on exp://192.168.1.233:19000 ' Scan the QR code above with Expo Go (Android) or the Camera app (iOS)
- It will also open a browser tab with the Expo developer tools for managing where the application is run, viewing logs, and other miscellaneous activities. Figure 16.1 shows what the Expo developer tools look like:
...