reactnative
/

Environment Setup – Expo vs. CLI

Last Sync: Today

On this page

5
0%
5 min read
Remaining
5 minleft

Click any section to jump — progress syncs automatically

reactnative

Environment Setup – Expo vs. CLI

Choosing Your Workflow

In 2026, there are two primary paths to start a React Native project. Expo is the recommended 'Framework' approach (similar to Flutter's standard flow), providing a managed suite of tools and easy OTA (Over-the-Air) updates. React Native CLI is the 'Bare' approach, giving you full control over the ios/ and android/ directories, which is essential if you plan to write complex native C++ or Swift modules for Revochamp.

  1. Prerequisites (The Core Toolchain)

Before installing React Native, you need the underlying platform tools. As a Lead Developer, you likely already have these for Flutter, but React Native adds a dependency on Node.js and a package manager like Yarn or pnpm.

  • Node.js (LTS): The JavaScript runtime that executes the build scripts.
  • Watchman: A tool by Meta for watching file changes (improves 'Fast Refresh' speed).
  • JDK (Java Development Kit): Required for Android builds (Azul Zulu is recommended).
  • Xcode & Android Studio: For platform-specific compilers and emulators.

  1. Setting Up with Expo (The Modern Standard)

Expo has evolved into a production-grade framework. It handles the 'Native Runner' complexity for you while allowing 'Continuous Native Generation' (CNG), which means you don't have to manually touch Xcode or Android Studio files unless necessary.

BASHRead-only
1
# Create a new Expo project
npx create-expo-app@latest MyRevoApp

# Start the development server
npx expo start

  1. Setting Up React Native CLI

For projects requiring custom native engines or integration with existing native libraries, the CLI is the way to go. This setup requires more manual configuration of environment variables (like ANDROID_HOME).

BASHRead-only
1
# Initialize a template project
npx react-native@latest init MyProject

# Install iOS dependencies (macOS only)
cd ios && pod install && cd ..

  1. Enabling the New Architecture

To leverage JSI and Fabric, you must ensure the New Architecture is enabled. In 2026, this is the default for new projects, but it's important to verify it in your project settings to ensure your AI generation logic isn't running through the legacy bridge.

FeatureExpo ManagedReact Native CLI
Native FoldersHidden/GeneratedAlways visible
Setup ComplexityVery LowModerate
OTA UpdatesBuilt-in (Expo Updates)Requires 3rd party (CodePush)
Custom Native CodeVia Config PluginsDirectly in Swift/Kotlin
Build TimesFast (Cloud/Local)Standard Local Builds

Test Your Knowledge

Q1
of 3

Which tool is used to watch file changes and provide 'Fast Refresh' in React Native?

A
Metro
B
Watchman
C
Hermes
D
Yarn
Q2
of 3

Which workflow allows for 'Continuous Native Generation' without manually editing ios/android folders?

A
React Native CLI
B
Expo
C
NativeScript
D
Flutter
Q3
of 3

What is the primary JavaScript bundler used by React Native?

A
Webpack
B
Vite
C
Metro
D
Rollup

Frequently Asked Questions

What is the Metro Bundler?

Metro is the JavaScript bundler for React Native. It takes all your JS files and combines them into a single bundle that is sent to the app. It's also responsible for 'Fast Refresh,' allowing you to see code changes instantly without a full re-compile.

Do I need to use CocoaPods?

Yes, for iOS development. CocoaPods is the dependency manager for Swift/Objective-C. Even if you use Expo, it uses CocoaPods under the hood to link native libraries to your Xcode project.

Should I use pnpm or npm?

As an Architect, pnpm or Yarn Berry is recommended for large projects because they handle nested dependencies more efficiently and provide faster installation times compared to standard npm.

Previous

react native introduction

Next

react native project structure

Related Content

Need help?

Explore our comprehensive docs or start a chat with our tech experts.