Setting up your environment means installing the tools you need to build and run mobile apps. This helps your computer understand and run your app code.
Environment setup (Node, Watchman, Xcode, Android Studio) in React Native
1. Install Node.js from https://nodejs.org/ 2. Install Watchman (macOS only) using Homebrew: brew install watchman 3. Install Xcode from the Mac App Store (for iOS development) 4. Install Android Studio from https://developer.android.com/studio 5. Set up Android SDK and emulator inside Android Studio 6. Configure environment variables for Android SDK 7. Verify installations by running commands like node -v, watchman -v, xcodebuild -version, and adb version
Node.js lets you run JavaScript code on your computer outside the browser.
Watchman helps watch for file changes to speed up app reloads during development.
node -v
watchman -v
xcodebuild -version
adb version
This simple React Native app shows a message confirming your environment is ready. You can run this app on your phone or emulator to check your setup.
import React from 'react'; import { Text, View } from 'react-native'; export default function App() { return ( <View style={{flex:1, justifyContent:'center', alignItems:'center'}}> <Text>Environment Setup Complete!</Text> </View> ); }
Make sure to restart your terminal or computer after installing tools to update system paths.
For iOS development, Xcode only works on macOS.
Android Studio setup requires downloading SDKs and creating virtual devices (emulators) for testing.
Install Node.js to run JavaScript on your computer.
Use Watchman on macOS to watch file changes faster.
Install Xcode for iOS apps and Android Studio for Android apps.
Verify each tool by checking its version in the terminal.