CodeBlanks Logo Icon CodeBlanks

Running

Learn to run the app with Expo start.

expo start

To run the project, you type npx expo start in the terminal. This command starts a development server and displays a QR code.

Open the Expo Go app on your phone and scan the QR code to see the app instantly. The phone and the computer must be on the same network.

While the server runs, saving the file reloads the app automatically. This feature is called fast refresh.

Testing with Expo Go

Expo Go is an app that opens Expo projects on the phone. It is free on both App Store and Google Play.

When you scan the QR code, Expo Go downloads your code and displays it on the screen. This is the easiest way to test on a real device.

If you prefer, you can also press j to open the app in a web browser; but for the most accurate result, use a phone.

Practice Welcome app

Write a runnable App component. It should return <View> containing <Text>Welcome</Text>. Include the import line.

Starter code

App.js
// Import from react-native
// Write the App component

Sample solution

App.js
import { View, Text } from 'react-native';

function App() {
  return (
    <View>
      <Text>Welcome</Text>
    </View>
  );
}

export default App;

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 Server command

Question
Start the development server: npx expo ____
Answer
Start the development server: npx expo start

Explanation: npx expo start launches the server.

2 What does fast refresh do?

  • Recompiles the app
  • Restarts the phone
  • Hides the QR code
  • Applies changes instantly when you save Correct answer

Explanation: Fast refresh applies changes instantly when you save.

3 Match the running concepts

Term Meaning
npx expo start Server start
Expo Go Phone app
QR code Scan
Fast refresh Instant reload

All lessons in Beginner