Chapter 2 of 12
~15 min read
Project Setup, Expo CLI & Architecture
cordova create & config.xml vs npx create-expo-app & app.json, EAS Build vs cordova build android.
1. Project Creation & CLI Tooling
In 2026, the official React Native documentation strongly advises starting all new projects with Expo. Expo is to React Native what Vite/Next.js is to modern web development: zero native build pain, automatic OTA updates, and standard file-based routing.
Cordova CLI
# 1. Global install
npm install -g cordova
# 2. Create project
cordova create MyApp com.myorg.app MyApp
# 3. Add Android platform
cd MyApp
cordova platform add android
# 4. Add plugins
cordova plugin add cordova-plugin-camera
# 5. Build and run
cordova build android
cordova run android --device
Expo / React Native CLI
# 1. Create modern project with Expo Router
npx create-expo-app@latest MyApp
# 2. Navigate to project
cd MyApp
# 3. Start interactive development server
npx expo start
# 4. Add platform libraries with compatible versions
npx expo install expo-camera expo-image-picker
# 5. Run on Android emulator / connected device
npx expo run:android
2. Configuration: config.xml vs app.json
Cordova used XML-based config.xml with preferences and plugin tags. React Native with Expo uses standard JSON in app.json:
Cordova config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.example.myapp" version="1.0.0">
<name>MyApp</name>
<description>A Cordova App</description>
<preference name="Orientation" value="portrait" />
<preference name="android-minSdkVersion" value="24" />
<preference name="android-targetSdkVersion" value="35" />
<platform name="android">
<icon src="res/android/icon.png" />
</platform>
</widget>
Expo app.json
{
"expo": {
"name": "MyApp",
"slug": "myapp",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "automatic",
"android": {
"package": "com.example.myapp",
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"plugins": ["expo-camera"]
}
}