When you use create-react-native-app to bootstrap your React Native project, several commands are added to your package.json file. These are listed as part of the command output (refer to the previous section to see what this output looks like). The most common command that you'll use is start:
npm start
This command will start the packager process. This process will build native UI components as you update their source. It doesn't perform a native build for the actual target platform, as this would be too expensive performance-wise. Instead, it will efficiently build your app for use with a variety of simulators for development:
Here's what the output of npm start looks like:
Starting packager...
Packager started!
Your app is now running at URL: exp://192.168.86.21:19000
View your app with live reloading:
Android device:
-> Point the Expo app to the QR code above.
(You'll find the QR scanner on the Projects tab of the app.)
iOS device:
-> Press s to email/text the app URL to your phone.
Emulator:
-> Press a (Android) or i (iOS) to start an emulator.
Your phone will need to be on the same local network as this computer.
For links to install the Expo app, please visit https://expo.io.
Logs from serving your app will appear here. Press Ctrl+C at any time to stop.
› Press a to open Android device or emulator, or i to open iOS emulator.
› Press s to send the app URL to your phone number or email address
› Press q to display QR code.
› Press r to restart packager, or R to restart packager and clear cache.
› Press d to toggle development mode. (current mode: development)
There are number of options for you to simulate your native application. By default, you're in development mode—you'll likely stay in development mode. Not pictured in the preceding output, the output also includes a QR code that you can scan with the Expo mobile app.