No history yet

Introduction to Expo

A Simpler Way to Build Apps

Building a mobile app from scratch usually means juggling two different worlds: one for iOS and another for Android. This often requires separate codebases, different programming languages (like Swift for iOS and Kotlin for Android), and specialized tools like Xcode and Android Studio. It’s a lot to manage.

React Native changed the game by allowing developers to write code once in JavaScript and run it on both platforms. This saves a huge amount of time and effort. But even with React Native, you still have to deal with the complexities of native development environments for certain tasks.

Lesson image

This is where Expo comes in. Expo is a set of tools, libraries, and services built around React Native that makes the development process even smoother. Think of it as an all-in-one toolkit that handles much of the tedious setup and configuration, so you can focus on building your app's features.

Expo is a framework and a platform for universal React applications.

How Expo Makes Life Easier

Expo's main goal is to simplify the developer experience. Instead of needing to open Xcode or Android Studio to build and test your app, you can do almost everything from the command line and a code editor.

One of its most powerful features is the Expo Go app. You install Expo Go on your physical iPhone or Android device. Then, while you're developing on your computer, you can scan a QR code to open your app on your phone. Every time you save a change in your code, the app on your phone updates instantly. This creates a fast, real-time feedback loop that's incredibly efficient.

Lesson image

Another major advantage is Over-the-Air (OTA) updates. Normally, to release a bug fix or a small feature, you’d have to submit a new version of your app to the Apple App Store and Google Play Store and wait for it to be reviewed. With Expo, you can push updates directly to users who have already downloaded your app, much like updating a website. This is perfect for rolling out quick fixes and improvements without the lengthy review process.

For over-the-air (OTA) updates, you can use Expo's EAS Update to push changes without resubmitting to the app store.

Managed vs Bare Workflows

When you start a project with Expo, you have two main options, known as workflows. Your choice depends on how much control you need over the native code.

Managed Workflow: This is the easiest way to get started. Expo manages all the native code for you. You write your app entirely in JavaScript/TypeScript and use Expo's vast library of APIs to access native features like the camera, GPS, and notifications. You never have to touch Xcode or Android Studio. This is the best choice for a majority of apps.

The Expo Managed Workflow allows teams to build React Native apps without manually configuring native modules (e.g., Xcode, Android Studio, Gradle).

Bare Workflow: Sometimes, an app needs a very specific native feature that isn't included in the Expo SDK. In this case, you can use the Bare workflow. This approach still gives you access to many of Expo's tools and libraries, but it also generates the native iOS and Android project files (ios and android directories). This allows you to write your own custom native code or integrate third-party native modules directly. It offers more flexibility but requires you to manage the native side of your project.

The great thing about Expo is that you aren't locked in. You can start with the simple managed workflow and, if your needs change, transition to the bare workflow later on. This flexibility makes Expo an excellent choice for projects of all sizes, from simple prototypes to complex, large-scale applications.