Welcome to a new React Native project, initialized using the @react-native-community/cli
.
Note: Ensure you've completed the React Native - Environment Setup up to the "Creating a new application" step before proceeding.
Metro is the JavaScript bundler included with React Native. To start it, execute the following command in your project's root directory:
# Using npm
npm start
# Or using Yarn
yarn start
Keep the Metro Bundler running in its terminal. In a new terminal and from your project's root, execute the following command to run your Android or iOS app:
# Using npm
npm run android
# Or using Yarn
yarn android
# Using npm
npm run ios
# Or using Yarn
yarn ios
If set up correctly, your app should appear in the Android Emulator or iOS Simulator, provided your emulator/simulator settings are accurate. Alternatively, you can also launch your app directly from Android Studio or Xcode.
Now that your app is up and running:
- Open
App.tsx
in your preferred text editor and make some edits. - To see changes:
- For Android: Double press the R key or select "Reload" from the Developer Menu (Ctrl + M on Windows/Linux or Cmd ⌘ + M on macOS).
- For iOS: Press Cmd ⌘ + R in the iOS Simulator.
You've successfully launched and edited your React Native app. 🥳
- To integrate this React Native code into an existing application, review the Integration guide.
- To delve deeper into React Native, begin with the Introduction to React Native.
Encountering issues? Consult the Troubleshooting guide.
Learn more about React Native:
- React Native Website - A comprehensive resource on React Native.
- Getting Started - An overview of React Native and environment setup.
- Learn the Basics - A guided introduction to React Native fundamentals.
- Blog - Stay updated with the latest official React Native blog posts.
@facebook/react-native
- The open-source GitHub repository for React Native.