React Native Setup and Hello World — Mobile

Create the project with npx create-expo-app@latest rinis-laundry (this lesson was recorded on Expo SDK 57: React Native 0.86.3, React 19.2.3; as of 15…

By the end of this lesson your phone shows the first screen of Mrs. Rini's Laundry, with the text "3 active orders". You won't need to open Xcode or Android Studio. One command from Expo, the React Native framework the official React Native docs recommend, is enough. That command creates a React Native project: a folder with your JavaScript/TypeScript code plus the tools that turn it into an app on a phone. While you code, think of your laptop as Mrs. Rini's central kitchen and your phone as the outlet. Metro, React Native's built-in bundler, is the courier who packs every recipe into one parcel and takes it to the outlet. Each time you change a recipe, the courier only brings the page that changed.

Creating the project

All you need is Node.js (an LTS version) on your laptop, and a phone (or an emulator). Then one command:

npx create-expo-app@latest rinis-laundry

This is the real output, run on 11 October 2026 (shortened):

Creating rinis-laundry using the expo-template-default@sdk-57 template.

✔ Downloaded and extracted project files.
> npm install

added 607 packages, and audited 608 packages in 52s

✅ Your project is ready!

As of 15 November 2026, the latest stable SDK is SDK 58 (released 15 October 2026), and Expo Go in the stores is already for SDK 58. The same command now uses expo-template-default@sdk-58: React Native 0.88.1, React 19.3.0 and TypeScript 6.0.3. The output and the version numbers in these mobile lessons were recorded on SDK 57. Expo Go opens only one SDK version, so an SDK 57 project no longer opens in Expo Go from the store: upgrade it to SDK 58, or use a development build.

Old tutorials use npx react-native init ProjectName. That command has been removed since React Native 0.77 (January 2025). Without a framework, the official CLI is now called directly: npx @react-native-community/cli@latest init ProjectName.

What's in the folder

rinis-laundry/
├── src/
│   ├── app/              # screens: every file here becomes a route
│   │   ├── _layout.tsx   # wraps every screen
│   │   ├── index.tsx     # the first screen
│   │   └── explore.tsx   # a second example screen
│   └── components/       # components you reuse
├── assets/               # icons and images
├── scripts/reset-project.js
├── app.json              # name, icon, scheme "rinislaundry"
├── package.json          # "main": "expo-router/entry"
└── tsconfig.json

The first screen

// src/app/_layout.tsx
import { Stack } from 'expo-router';

export default function RootLayout() {
  return (
    <Stack>
      <Stack.Screen name="index" options={{ title: 'My orders' }} />
    </Stack>
  );
}
// src/app/index.tsx
import { StyleSheet, Text, View } from 'react-native';

export default function Index() {
  return (
    <View style={styles.container}>
      <Text style={styles.title}>Mrs. Rini's Laundry</Text>
      <Text style={styles.subtitle}>3 active orders</Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: { flex: 1, alignItems: 'center', justifyContent: 'center', backgroundColor: '#fff' },
  title: { fontSize: 28, fontWeight: 'bold' },
  subtitle: { fontSize: 16, color: '#555', marginTop: 8 },
});

Running it on your phone

cd rinis-laundry
npx expo start

The real output, shortened:

Using src/app as the root directory for Expo Router.
React Compiler enabled
Starting Metro Bundler

(QR code)

› Scan the QR code above to open in Expo Go.
› Metro: exp://192.168.100.96:8081
› Web: http://localhost:8081

› Using Expo Go
› Press s │ switch to development build

Scan the QR code with the Expo Go app on your phone. The phone downloads the JavaScript from your laptop at exp://192.168.100.96:8081, so the phone and the laptop must be on the same Wi-Fi. As soon as the phone asks, the terminal logs:

Android Bundled 25721ms node_modules/expo-router/entry.js (1401 modules)

Expo Go or a development build

Metro and Fast Refresh

Metro is a JavaScript bundler: it starts at the first file (expo-router/entry), follows every import, turns TSX into plain JavaScript, joins everything into one bundle, and serves it to the phone on port 8081. The (1401 modules) above is the number of files joined, into one development bundle of 6.3 MB. The first time (with an empty cache) it took 25.7 seconds. On the same laptop, after the code changed, the next bundle finished in 3.4 seconds because the rest came from the cache.

Now change "3 active orders" to "2 active orders" and save. Guess first: do you have to rebuild the app and install it on the phone again?

When you save a change, Metro sends only the modules that changed, and Fast Refresh updates the screen within seconds without losing state. No rebuild, no reinstall. You only rebuild when native code changes.

Metro is not the bridge to native (that's JSI's job), not the runtime that runs JavaScript on the phone (that's Hermes), and it doesn't turn React into Swift or Kotlin. A released app has no Metro server: its bundle is already inside the app.

⚠️ Why won't the project run?

TL;DR: Create the project with npx create-expo-app@latest rinis-laundry (this lesson was recorded on Expo SDK 57: React Native 0.86.3, React 19.2.3; as of 15 November 2026 the command uses SDK 58: React Native 0.88.1, React 19.3.0). npx react-native init has been removed since 0.77; without a framework use npx @react-native-community/cli@latest init. Screens live in src/app, and index.tsx is the first screen, wrapped by _layout.tsx. npx expo start starts Metro and shows a QR code for Expo Go. Metro is a JavaScript bundler: it gathers every module (1,401 modules, 6.3 MB) into one bundle and serves it to the phone, and Fast Refresh updates the screen without a rebuild. Expo Go is good for learning; a development build is required once you need your own native code.

⚡ One command, one project

Write:

npx create-expo-app@latest rinis-laundry

Meaning: This Expo command creates a complete React Native project, without opening Xcode or Android Studio. Old tutorials use npx react-native init, but that command has been removed since React Native 0.77.

⚡ The first screen

Write:

<View style={styles.container}>
  <Text style={styles.title}>Mrs. Rini's Laundry</Text>
  <Text style={styles.subtitle}>3 active orders</Text>
</View>

Meaning: Screens live in src/app, and index.tsx is the first screen. View is a box (the counterpart of div), Text is text (the counterpart of p), and styles are written as JavaScript objects.

⚡ Metro, the courier

Guess first: you change "3 active orders" to "2 active orders" and save. Do you have to rebuild the app and install it on the phone again?

No. Metro sends only the modules that changed, and Fast Refresh updates the screen within seconds without losing state.

Meaning: Metro is a JavaScript bundler: it starts at expo-router/entry, follows every import, joins everything into one bundle, then serves it to the phone on port 8081. Metro is not the bridge to native (that's JSI) and not the runtime (that's Hermes).

What you will learn