1. Goodbye to Native Folders: The Prebuild System
In modern Expo projects (in your GitHub repository), you won't see
iosandroidapp.jsonWhen you install a native module to your project (for example,
expo-cameranpx expo prebuild- Expo reads the file in your project.typescript
app.json - It generates pristine, brand-new andtypescript
androidfolders from scratch.typescriptios - Thanks to Config Plugins, it automatically "injects" all the native configurations required by the packages you installed (camera permissions, Info.plist modifications, Gradle configurations) into these new folders.
A Metaphor: Manufacturing with a 3D Printer Think of the
andtypescriptiosfolders in the past like a sculpture you shaped by hand with clay; when you messed something up, it was very hard to fix. The Prebuild architecture, on the other hand, is like a 3D Printer. You only provide the 3D model (typescriptandroid). If the output (the native folders) gets corrupted, you don't care; you just delete the folders and "print" a flawless copy from scratch in seconds with a single click.typescriptapp.json
This way, you never have to deal with native code blocks (Java/Swift). Everything is managed from the JavaScript world and via
app.json2. Moving the Build Process to the Cloud: EAS (Expo Application Services)
To convert these automatically generated native folders into a physical
.apk.ipaEAS Build takes this process off your local machine and moves it to cloud servers. The system running in the background:
- Clones your code to a remote Virtual Machine.
- Executes the process mentioned above over there.typescript
prebuild - Compiles the code by running Apple's or Android'stypescript
xcodebuildcommands.typescriptgradlew - Delivers the signed installation file to you.
So essentially, while writing code on a Windows or Linux machine, you are renting a Mac in the cloud to have your project built for iOS.
3. Universal Routing: Expo Router
The biggest revolution from Expo in recent times is undoubtedly Expo Router.
In traditional React Native projects,
React NavigationThe Expo team asked, "Why don't we bring this convenience to mobile?"
Under the hood, Expo Router still uses the native power of
React Navigation- You create a file named .typescript
app/profile/settings.tsx - Expo Router analyzes this folder structure in the background.
- During the bundle phase, it automatically converts this structure into screens and native routers.typescript
React Navigation
Why "Universal"?
The real magic of Expo Router is its ability to produce both web and mobile applications from the same codebase. During the build time, the Metro bundler:
- Creates native tab bar and stack structures for mobile devices.
- When it compiles the same code for the web, it generates classic web routing (URL routing) that directly maps to the browser URL.
With the same mental model, you get to master iOS, Android, and web platforms all at once.
Summary
This code journey, which begins with React's Virtual DOM and is translated into hardware language via JSI and Hermes, has become highly manageable, modern, and "Universal" with Expo's Prebuild and Router architecture.
Today, writing a modern React Native / Expo application is not just about developing a mobile app; it is about building a single, scalable architecture for all platforms.