Back

Getting Started with Expo: A Faster Way to Build React Native Apps

Getting Started with Expo: A Faster Way to Build React Native Apps

If you’re a JavaScript developer who wants to build mobile apps without wrestling with Xcode or Android Studio, you’re in the right place. React Native lets you build cross-platform apps with JavaScript, but the initial setup can be daunting. That’s where Expo comes in—it removes the complexity and gets you building immediately.

Key Takeaways

  • Expo eliminates native setup requirements for React Native development
  • Create, test, and deploy apps without Xcode or Android Studio
  • Expo Go enables instant testing on physical devices via QR codes
  • EAS Build handles production builds and app store deployment in the cloud

What is Expo and Why Should You Use It?

Expo is a framework and platform built on top of React Native that handles the painful parts of mobile development. Think of it as React Native with batteries included. You write JavaScript, and Expo handles the native configuration, build process, and device APIs.

Here’s what makes Expo particularly useful:

  • No native setup required: Skip installing Xcode, Android Studio, or configuring build tools
  • Instant testing: Preview changes on your phone in seconds using Expo Go
  • Managed workflow: Expo handles certificates, app signing, and build configuration
  • Built-in APIs: Access camera, location, notifications, and more without native code
  • Cross-platform by default: One codebase runs on iOS, Android, and web

Creating Your First Expo App with create-expo-app

Starting a new React Native project with Expo takes just one command. Open your terminal and run:

npx create-expo-app my-app
cd my-app
npx expo start

That’s it. No global installations, no complex configuration. The create-expo-app command sets up everything you need: project structure, dependencies, and configuration files.

When you run npx expo start, you’ll see a QR code in your terminal. This is where the magic happens.

The Development Loop: Code, Save, and See Changes Instantly

Testing with Expo Go

Download the Expo Go app on your iOS or Android device. Scan the QR code from your terminal, and your app loads instantly on your phone. No USB cables, no build process.

Make a change to your code:

// App.js
import { Text, View } from 'react-native';

export default function App() {
  return (
    <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
      <Text style={{ fontSize: 24 }}>Hello, Expo!</Text>
    </View>
  );
}

Save the file, and your phone updates immediately. This hot reload cycle makes React Native development feel like web development—fast and iterative.

When You Need More: Development Builds

Expo Go covers most development needs, but sometimes you need custom native code or specific native modules. That’s when you create a development build—essentially a custom version of Expo Go tailored to your app.

npx expo install expo-dev-client
npx expo run:ios  # or run:android

Development builds give you the flexibility of bare React Native with the convenience of Expo’s tooling.

Building and Deploying with EAS Build

When you’re ready to ship, EAS Build handles the complex build process in the cloud. No need to maintain build environments or deal with certificates manually.

Setting Up EAS Build

First, install the EAS CLI:

npm install -g eas-cli
eas login

Configure your project for building:

eas build:configure

Creating Production Builds

Build for iOS or Android with a single command:

eas build --platform ios
eas build --platform android

EAS Build handles:

  • Code signing and certificates
  • Native dependencies
  • Build optimization
  • Distribution to app stores

The builds run on Expo’s servers, so you don’t need a Mac to build iOS apps. When complete, you get a download link for your app binary or a direct submission to the app stores.

The Complete Expo Workflow

Here’s how everything fits together:

  1. Initialize: Use create-expo-app to start your project
  2. Develop: Write JavaScript, test instantly with Expo Go
  3. Iterate: Hot reload shows changes immediately
  4. Build: Use EAS Build when ready for production
  5. Deploy: Submit directly to app stores or distribute internally
  6. Update: Push JavaScript updates over-the-air without app store review

This workflow eliminates the traditional pain points of React Native development. No more “it works on my machine” problems, no more certificate headaches, no more platform-specific build issues.

Conclusion

Expo transforms React Native development from a complex, platform-specific process into something as straightforward as web development. With create-expo-app, you’re writing and testing code in minutes, not hours. With Expo Go, you’re iterating at web development speeds. And with EAS Build, you’re deploying without the traditional mobile development overhead.

If you’ve been hesitant about mobile development because of the setup complexity, Expo removes that barrier. Start with npx create-expo-app, and you’ll have a working app on your phone before your coffee gets cold.

FAQs

Yes, you can add Expo to existing React Native projects using the Expo modules. Run npx install-expo-modules in your project directory to integrate Expo's APIs and development tools while keeping your current setup.

Expo Go includes a fixed set of native modules and cannot run custom native code. If you need specific native libraries or custom modules, create a development build instead, which provides full flexibility while maintaining Expo's developer experience.

EAS Build offers a free tier with limited build minutes per month. Paid plans start at $29 per month for individuals and scale based on build frequency and team size. You can also build locally for free using expo run commands.

Yes, you can prebuild your Expo project to generate native iOS and Android directories, giving you complete control over native code. This maintains Expo libraries while allowing direct native modifications when needed.

Gain Debugging Superpowers

Unleash the power of session replay to reproduce bugs, track slowdowns and uncover frustrations in your app. Get complete visibility into your frontend with OpenReplay — the most advanced open-source session replay tool for developers. Check our GitHub repo and join the thousands of developers in our community.

OpenReplay