Skip to main content

Command Palette

Search for a command to run...

Setting up React-Native Working Environment

Published
•1 min read•View as Markdown
Setting up React-Native Working Environment
P

🌟 Full Stack Developer | Problem Solver | Tech Enthusiast 🌟

With 1 year of hands-on experience in full stack development, I specialize in building responsive, scalable, and efficient web applications. Passionate about both frontend and backend technologies, I love solving complex problems and constantly seek out new learning opportunities.

🔧 Skills: React.js, Python, Django, HTML, CSS, MySQL, and more!

I am now actively looking for a new role where I can apply my expertise, contribute innovative solutions, and help drive the success of a forward-thinking organization. Let's build something impactful together!

Step1: Install Node.js and npm

React Native requires Node.js and npm (Node Package Manager).

  • Download and install Node.js from the official website.

  • Verify the installation by running:
    node -v

    npm -v

Step2: Install React Native CLI

npm install -g react-native-cli

Step3: Install Android Studio (for Android development)

React Native uses Android Studio for Android development. Follow these steps:

  1. Download and install Android Studio from the official website.

  2. Set up the Android environment:

    • Install the required Android SDKs from Android Studio’s SDK Manager (SDK version 31 or newer).

    • Enable the “Android Virtual Device (AVD)” in the SDK Manager to create emulators.

  3. Set environment variables:

    In your system set environment variables locate to your SDK paths like

    Create ANDROID_HOME = C:\Users\your user\AppData\Local\Android\Sdk

    C:\Users\your user\AppData\Local\Android\emulator

    C:\Users\your user\AppData\Local\Android\tools

    C:\Users\your user\AppData\Local\Android\tools/bin

    C:\Users\your user\AppData\Local\Android\platform-tools

Step4: Set up a New React Native Project

Now that you’ve set up the environment, create a new React Native project:

npx react-native init Your-Projectname

Step5: Run the React Native Project

  • For Android: Make sure the Android emulator is running or a real device is connected, then run:

    npx react-native run-android

  • For iOS (macOS only):

    npx react-native run-ios