React Native course Β· Module 1: Your first app
Creating Your First Expo Project
In this lesson5
Time to create your first project in Atlantis! We will use the latest version of Expo with Expo Router.
Creating the Project
Open a terminal and run:
# Create a new project with a template
npx create-expo-app@latest AtlantisApp
# Navigate to the project folder
cd AtlantisAppExpo will ask about a template - choose "blank (TypeScript)" for a clean project.
Alternatively with Expo Router (recommended):
npx create-expo-app@latest AtlantisApp --template tabs
cd AtlantisAppProject Structure
After creating the project, you will see:
AtlantisApp/
βββ app/ # App screens (Expo Router)
β βββ (tabs)/ # Tab navigation group
β β βββ index.tsx # First tab (Home)
β β βββ explore.tsx # Second tab (Explore)
β β βββ _layout.tsx # Layout for tabs
β βββ _layout.tsx # Main app layout
β βββ +not-found.tsx # 404 screen
βββ assets/ # Images, fonts, icons
β βββ images/
β βββ fonts/
βββ components/ # Reusable components
βββ constants/ # Constants (colors, dimensions)
βββ hooks/ # Custom hooks
βββ app.json # Expo configuration
βββ package.json # Dependencies
βββ tsconfig.json # TypeScript configuration
βββ babel.config.js # Babel configurationIn the template from Expo SDK 55 onwards, the screens live in src/app/ instead of a top-level app/. Expo Router supports both locations.
Running the Project
# Start the development server
npx expo startYou will see:
βΊ Metro waiting on exp://192.168.1.100:8081
βΊ Scan the QR code above with Expo Go (Android) or the Camera app (iOS)
βΊ Using Expo Go
βΊ Press s β switch to development build
βΊ Press a β open Android
βΊ Press i β open iOS simulator
βΊ Press w β open web
βΊ Press r β reload app
βΊ Press m β toggle menu
βΊ Press ? β show all commandsTesting on Your Phone
- Install Expo Go from the App Store or Google Play
- Scan the QR code from the terminal
- The app will launch on your phone!
Testing on an Emulator
# Android (requires Android Studio)
npx expo start --android
# iOS (macOS only, requires Xcode)
npx expo start --ios
# Web (browser)
npx expo start --webThe app.json File - App Configuration
{
"expo": {
"name": "AtlantisApp",
"slug": "atlantis-app",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "atlantisapp",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#1a5276"
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.yourname.atlantisapp"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#1a5276"
},
"package": "com.yourname.atlantisapp"
},
"web": {
"bundler": "metro",
"output": "static",
"favicon": "./assets/images/favicon.png"
},
"plugins": ["expo-router"]
}
}Most Important Options:
| Option | Description |
|---|---|
name | Name displayed on screen |
slug | Unique project URL name |
version | App version |
icon | App icon (1024x1024px) |
splash | Loading screen |
ios.bundleIdentifier | ID for the App Store |
android.package | ID for Google Play |
Hot Reload - Instant Changes
Expo supports Fast Refresh - code changes are visible immediately without reloading the entire app!
Edit app/(tabs)/index.tsx:
import { Text, View, StyleSheet } from 'react-native';
export default function HomeScreen() {
return (
<View style={styles.container}>
<Text style={styles.title}>Welcome to Atlantis!</Text>
<Text style={styles.subtitle}>Your first Expo application</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#1a5276',
},
title: {
fontSize: 28,
fontWeight: 'bold',
color: '#fff',
marginBottom: 10,
},
subtitle: {
fontSize: 16,
color: '#aed6f1',
},
});Save the file - changes will appear instantly!
Spotted a mistake in this lesson?
Check yourself
Answer the questions from this lesson. Pick an answer to see right away whether it is correct.
1. In which folder are the application screens located when using Expo Router?
2. Which file contains the Expo app configuration (name, icon, splash screen)?