Skip to content

Instantly share code, notes, and snippets.

@steeeved
Created January 15, 2025 16:02
Show Gist options
  • Select an option

  • Save steeeved/8935d7537d1586d7b04125033ce5eac6 to your computer and use it in GitHub Desktop.

Select an option

Save steeeved/8935d7537d1586d7b04125033ce5eac6 to your computer and use it in GitHub Desktop.
Detailed Setup Guide for React Native Development
# Step 1: Install Node.js
Node.js is essential for running JavaScript outside a browser and managing packages for React Native.
-Download Node.js
-Visit the official Node.js website.
Download the LTS (Long Term Support) version for your operating system (recommended for stability).
# Install Node.js
-Run the downloaded installer and follow the prompts.
-During installation, ensure the option to add Node.js to your system's PATH is checked.
Verify the Installation
Open a terminal or command prompt.
Run the following commands to confirm installation:
code
node -v
npm -v
These commands should return the installed versions of Node.js and npm (Node Package Manager).
# Install Expo CLI
Expo CLI simplifies React Native development by handling many setup tasks.
Install Expo CLI Globally
-Open a terminal or command prompt.
-Run the following command:
code
npm install -g expo-cli
Verify the Installation
Check if Expo CLI is installed by running.
code
expo --version
Alternative: Install React Native CLI.
React Native CLI provides more flexibility but requires additional tools.
Follow the Official Setup Guide
Visit the React Native CLI Setup Guide.
Select your development environment (Mac, Windows, or Linux) and follow the instructions under the "React Native CLI Quickstart" tab.
Install Additional Tools
Depending on your platform, you may need:
1)Android Studio for Android development.
2)Xcode (for macOS users) for iOS development.
# Test the Setup
Create a New React Native Project (Expo)
Run the following command in the terminal:
Code
expo init MyFirstApp
cd MyFirstApp
expo start
-This will start the Expo development server. You can scan the QR code using the Expo Go app on your mobile device to preview the app.
-Create a New React Native Project (React Native CLI)
Run:
npx react-native init MyFirstApp
cd MyFirstApp
npx react-native run-android # For Android
npx react-native run-ios # For iOS (Mac only)
Additional Notes
•⁠ ⁠Ensure you have a working internet connection throughout the setup.
•⁠ ⁠For Android development, enable USB Debugging on your phone or set up an Android emulator.
•⁠ ⁠For iOS development, use Xcode (available on macOS only).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment