skip to content

How do you start a new Expo project with create-expo-app, and how do its default, blank, tabs and bare-minimum templates differ?

level: juniorimportance: must knowfreq 45%

answer

  1. npx create-expo-app, then a name
  2. default: Expo Router plus TypeScript
  3. tabs: file-based routing, tab layout
  4. bare-minimum: android and ios generated
  5. --example pulls from expo/examples

basics

~10 s

Run npx create-expo-app with an optional --template: default adds Expo Router and TypeScript for multi-screen apps, blank is minimal, tabs sets up file-based tab navigation, and bare-minimum also generates the android and ios folders.

solid answer

~40 s

`npx create-expo-app@latest my-app` scaffolds a project from a template and installs dependencies. Without `--template` it uses `default`, which targets multi-screen apps with Expo Router and TypeScript configured. `blank` installs the minimum without navigation, and `blank-typescript` is the same with TypeScript. `tabs` configures file-based routing with Expo Router and a tab layout. `bare-minimum` is blank plus generated `android/` and `ios/` directories, because it runs `npx expo prebuild` during setup. For a feature-specific start, `--example with-router` pulls from the expo/examples repository instead; `--example` and `--template` cannot be combined. For an Expo template without a version tag, an interactive run asks which SDK to use, and `--template default@sdk-<N>` pins it.

code

bash · 8 lines
bash
# Default template: Expo Router + TypeScript
npx create-expo-app@latest quiz-app

# Tab layout with file-based routing
npx create-expo-app@latest quiz-app --template tabs

# Start from an example in expo/examples instead
npx create-expo-app@latest quiz-app --example with-router

go deeper

for a junior

Know the command npx create-expo-app, that default brings Expo Router and TypeScript, and what blank, tabs and bare-minimum add or leave out.

for a middle

Explain why bare-minimum is different: it runs prebuild during setup, so native folders exist and are yours to maintain from the start.

for a senior

Choose a starting point deliberately: pin the SDK with a template tag and consider a team template published to npm or GitHub.

for a principal

Standardise how projects start so every app begins on the same SDK, structure and conventions, which keeps later upgrades uniform.

## What create-expo-app does `create-expo-app` is the command-line tool that creates a new Expo and React Native project. It downloads a **template**, renames it to your app name (the name also lands in the app config's `name`), installs npm dependencies with the package manager you invoked it with, and initialises a git repository when git is available and the folder is not already inside one. It is run through a package runner rather than installed: - npm: `npx create-expo-app@latest my-app` - yarn: `yarn create expo-app` - pnpm: `pnpm create expo-app` - bun: `bun create expo` The package manager you use decides how dependencies are installed, and the tool adds any extra configuration that manager needs, for example a `node-modules` linker for Yarn 2+ because Plug'n'Play does not work with React Native. ## The built-in templates | Template | What you get | Good for | |---|---|---| | `default` | Multi-screen starter with Expo Router, TypeScript and recommended tools | most new apps | | `blank` | Minimum dependencies, no navigation | learning, or bringing your own navigation | | `blank-typescript` | `blank` with TypeScript enabled | a minimal typed start | | `tabs` | File-based routing with Expo Router, a tab layout, TypeScript | apps whose shell is tabs | | `bare-minimum` | `blank` plus generated `android/` and `ios/` folders; runs `npx expo prebuild` during setup | teams that will edit native projects directly | `default` is used when you pass no `--template`. Passing `--template` with no value opens an interactive picker. ## Examples instead of templates `--example <name>` creates the project from the **expo/examples** repository, which holds small apps demonstrating one integration: `with-router`, or `with-react-navigation` for plain React Navigation instead of Expo Router. You choose **either** a template **or** an example; the tool refuses both at once. Examples are a fast way to see a working integration, but they are maintained as demos, so check their SDK version before building on one. ## Choosing the SDK and other options For an Expo template without a version tag, an interactive run asks which SDK to use: the latest release, or (when the store build of Expo Go lags behind) the SDK that the store's Expo Go supports. A tagged template such as `default@sdk-<N>` skips the prompt. Other flags: 1. `--yes` accepts the defaults without prompts, handy in scripts. 2. `--no-install` skips installing npm packages and CocoaPods. 3. `--template` also accepts a custom npm package, a GitHub repository URL or `owner/repo` shorthand, or a local `file:` tarball, so a team can publish its own starter. ## Picking a template in an interview answer The important contrast is between the three **managed-shaped** starts (`default`, `blank`, `tabs`), where the native folders do not exist and are generated later by prebuild, and **`bare-minimum`**, where they exist from the first commit. Starting bare means you own those native projects from day one. Most teams start with `default` and let prebuild generate native code when it is needed. ## Right after scaffolding A fresh project is only useful once it runs. The usual first minutes: 1. `cd` into the folder and start the dev server with `npx expo start`, which uses the CLI installed inside the project. 2. Open the app in Expo Go or a development build from the QR code or the Terminal UI shortcuts. 3. Run `npx expo-doctor` once, so any dependency or config problem from the template or your first installs shows up early. 4. Commit the clean scaffold before changing anything, so later diffs show only your work. ## Mistakes worth avoiding - Following an old tutorial's `expo init`; that global command is retired and points to `npx create-expo-app`. - Picking `bare-minimum` "to be safe" and then maintaining native projects nobody needed. - Starting from an example repository and assuming it is on the latest SDK. ## A worked choice: a quiz app prototype A developer building a quiz app with a home screen, a question flow and a results screen would pick `default` or `tabs`: both give Expo Router's file-based routes and TypeScript, so each screen is a file under `app/`. Choosing `blank` would mean installing and wiring navigation by hand, and `bare-minimum` would add native folders the prototype does not need yet.

  • Why would a team avoid bare-minimum for a new app?
    `bare-minimum` generates `android/` and `ios/` at creation, so the team owns and must maintain those native projects from the first commit. With `default`, `blank` or `tabs`, native code is generated from the app config by prebuild when needed, which keeps upgrades simpler until real native customisation is required.
  • How can a company start every new app from its own starter?
    Publish the starter as an npm package, or keep it in a GitHub repository, and pass it to `--template`: create-expo-app accepts npm package names, GitHub URLs or `owner/repo` shorthand, and local `file:` tarballs. The tool downloads it, renames it for the new project and installs dependencies as with a built-in template.

saying these in an interview costs you the question

  • create-expo-app must be installed globally first
  • The blank template includes Expo Router by default
  • Every template ships android and ios folders
  • You can pass --template and --example together
  • The tabs template uses plain React Navigation without Expo Router