Enos Tetéo
são paulo, sp

Getting Started with React Native

Setting Up Your Development Environment

React Native is a popular framework for building mobile applications using JavaScript and React. This guide will walk you through setting up your development environment and creating your first React Native app.

Prerequisites

  1. Install Node.js: Download and install Node.js from nodejs.org

  2. Install Watchman (for macOS users):

brew install watchman
  1. Install React Native CLI:
npm install -g react-native-cli
  1. Install Xcode (for iOS development on macOS)

    • Download from the Mac App Store
    • Install iOS Simulator
  2. Install Android Studio (for Android development)

    • Download from developer.android.com
    • Install Android SDK
    • Configure Android Emulator

Creating Your First React Native App

  1. Create a new project:
npx react-native init MyFirstApp
  1. Navigate to your project:
cd MyFirstApp
  1. Start Metro bundler:
npx react-native start
  1. Run on iOS (in a new terminal):
npx react-native run-ios
  1. Or run on Android:
npx react-native run-android

Next Steps

Congratulations! You've set up your development environment and created your first React Native app. Here are some next steps to continue your learning:

  • Explore the React Native documentation
  • Learn about components and JSX
  • Understand state and props in React
  • Experiment with styling in React Native
  • Try building a simple app, like a todo list or weather app