R
Rishtaara
React Native Fundamentals
Lesson 2 of 20Article18 minFREE

Environment Setup

You need Node.js 18+, a code editor (VS Code recommended), and platform SDKs for the devices you target. macOS is required for iOS Simulator; Android emulator runs on Windows, macOS, and Linux.

Prerequisites

You need Node.js 18+, a code editor (VS Code recommended), and platform SDKs for the devices you target. macOS is required for iOS Simulator; Android emulator runs on Windows, macOS, and Linux.

  • Node.js 18 LTS or 20 LTS — use nvm to manage versions.
  • Watchman (macOS) — file watcher for Metro: brew install watchman.
  • Xcode 15+ (macOS only) — iOS Simulator and App Store builds.
  • Android Studio — SDK, emulator, and platform tools.
  • JDK 17 — required by modern Android Gradle Plugin.

Create your first project

Using React Native CLI (bare workflow)
npx @react-native-community/cli@latest init MyFirstApp
cd MyFirstApp
# iOS (macOS only)
cd ios && pod install && cd ..
npx react-native run-ios
# Android
npx react-native run-android
Using Expo (recommended for beginners)
npx create-expo-app@latest MyFirstApp
cd MyFirstApp
npx expo start
# Press i for iOS simulator, a for Android emulator

Verify your setup

  • Metro bundler starts without errors on npx react-native start.
  • iOS Simulator or Android Emulator launches the default welcome screen.
  • Edit App.tsx — save — app hot-reloads within 2 seconds.
  • React Native Doctor: npx react-native doctor — fixes common issues.
Stuck on Android? Enable USB debugging on physical device or create AVD in Android Studio Device Manager.