Skip to main content
The V-App template uses Expo Router’s file-based routing with a root stack and an inner tabs layout to structure the app.

File-based routing overview

Expo Router automatically turns files in the app/ directory into screens (not pages!):
  • app/_layout.tsx defines a root Stack navigator that wraps the whole app and currently registers the (tabs) group as a stack screen.
  • app/(tabs)/_layout.tsx defines the Tab navigator, with individual tabs like home and settings mapped to files in the same folder.
  • app/(tabs)/home.tsx and app/(tabs)/settings.tsx are the screens shown inside those tab routes.
This matches Expo Router’s recommended pattern of nesting tabs inside a stack to keep a clear navigation tree. You might have noticed that we do not have a App.tsx/jsx which you might know from Vite+React Setups. However in Expo Router:
Every project should have a _layout.tsx file directly inside the src/app directory. This file is rendered before any other route in your app and is where you would put the initialization code that may have previously gone inside an App.jsx file, such as loading fonts, setting up theme providers, or interacting with the splash screen. For example, the default template wraps the app with a ThemeProvider for dark and light mode support and renders the AppTabs component from this file.

From: https://docs.expo.dev/router/basics/core-concepts
If you are familliar with Next.js, you might have noticed similarities, well that is because both Routers basically use the same file-based routing mechanism.

Root stack layout

The root layout wraps the app in navigation theming and sets up a stack navigator:
app/_layout.tsx (simplified)
Here, the stack contains a single child route called (tabs), which renders the tab navigator and shows a shared header with the title and the theme toggle. It is also common pracitce to keep non-navigation components outside the src/app directory, like in the @/components/ directory.

Tabs layout: native tabs + cross‑platform fallback

The template uses native tabs on iOS and standard bottom tabs for other platforms:
app/(tabs)/_layout.tsx (simplified)
  • On iOS, NativeTabs renders a platform-native tab bar with SF Symbols icons.
  • On Android / web, the regular Tabs layout from Expo Router is used with Ionicons.
The file names home.tsx and settings.tsx must match the name values used in the tabs layout for routing to work automatically.
More information regarding Tabs can be found here (web/android) and here (iOS).

Task 2: Screens

Create a new screen (let’s call it the detail screen) that is pushed onto the stack from the Home tab:
1

Create the details Screen

app/details.tsx
2

Add navigation to details from Home

In app/(tabs)/home.tsx, add a button that navigates to /details
  1. In React Native the onClick function is called onPress.
  2. You can use the router object from (expo-router) to navigate. (.push('<path>'))
3

Create another Screen and add it as a Tab

Optional Now add another screen called profile and add it between the Home and Settings tab.
After completing these steps, have a glance at the router documentation from Router notation till Navigation and then under Navigation Patterns: Stack and Tabs (JS and Native) and feel free to test things with the App until everyone is finished.