Skip to main content
Back to module
Mobile Development Basics · React Native Tour

Setting up your environment

Reading41mLesson 2 of 3 in this module

Create an Expo project and run it on your own phone with Expo Go.

Why setup matters

The first hour with a new platform decides whether you keep going. Mobile setup has a reputation for pain: SDKs, emulators, signing certificates. The good news is that you do not need any of that to start. With Expo, a free, open-source framework and toolset around React Native, you can run your own code on your own phone in a few minutes. You will add the heavier tools (Android Studio, Xcode) later, only when you need them.

The pieces

  • Node.js (an LTS release) runs the development tools on your computer.
  • create-expo-app generates a new project with sensible defaults.
  • The Expo CLI (npx expo start) runs the development server (Metro), which bundles your JavaScript and serves it to the phone.
  • Expo Go is a free app from the App Store and Google Play. It loads your project from the development server, so you do not need to build or sign anything to try your code.
  • Optional: Android Studio gives you an Android emulator on Windows, macOS or Linux. Xcode (macOS only) gives you the iOS Simulator. Neither is required for this lesson.

You do not need a paid developer account to run apps in Expo Go. Store accounts only matter when you publish, and they cost money: the Apple Developer Program is $99 per year and a Google Play developer account is a one-off $25 fee. Checked on 2026-10-23. Prices change, so check apple.com/developer and play.google.com/console before you pay.

Worked example: your first project

In a terminal:

node --version            # should print an LTS version, e.g. v22.x
npx create-expo-app@latest my-first-app
cd my-first-app
npx expo start

The last command prints a QR code and a menu. On Android, open Expo Go and scan the code. On iOS, scan it with the Camera app, which hands it to Expo Go. Your phone and computer must be on the same Wi-Fi network. If they cannot see each other (school or office networks often block this), stop the server and run npx expo start --tunnel instead.

The default template uses Expo Router, which turns files in the app/ folder into screens. Open app/(tabs)/index.tsx (the name may differ slightly between template versions), change some text and save. The app on your phone reloads within a second or two. This is Fast Refresh, and it keeps component state where it can.

A tiny screen of your own looks like this:

import { View, Text } from "react-native";

export default function HomeScreen() {
  return (
    <View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
      <Text>Hello from my phone</Text>
    </View>
  );
}

Useful commands in the Expo CLI

While npx expo start runs, press:

  • r to reload the app,
  • j to open the JavaScript debugger,
  • m to open the developer menu on the device (you can also shake the phone),
  • a to open an Android emulator, or i for the iOS Simulator, if you installed them.

Errors appear both in the terminal and as a red screen on the phone. Read the first line of the error and the file name it points to; that usually tells you exactly what broke.

Common mistakes

  • Phone and computer on different networks. The QR code points at your computer's local address. Use the same Wi-Fi or --tunnel.
  • Old Node.js. Very old versions fail with confusing errors. Install the current LTS from nodejs.org.
  • SDK mismatch. Expo Go from the stores supports the newest Expo SDK. If you open an older project, Expo Go may say it is incompatible; create a fresh project or upgrade the project's SDK.
  • Installing packages with plain npm when Expo expects specific versions. Use npx expo install <package>, which picks versions that match your SDK.
  • Editing the wrong file. With Expo Router, the screen you see comes from the app/ folder; components elsewhere only show up if a screen imports them.

Quick recap

  • Expo lets you run React Native code on a real phone without building or signing anything.
  • npx create-expo-app@latest, then npx expo start, then scan the QR code with Expo Go.
  • Fast Refresh reloads your changes almost instantly.
  • Emulators and simulators are optional; store accounts cost money and are only needed to publish.

Try it

The Do tab walks you through creating a project and running it on your own phone (or an emulator if you do not have one).

Also in this lesson: