From f8b28da2fa3d4c4dae259aba33f43203c5e372cb Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 14 Sep 2015 23:11:36 +0000 Subject: [PATCH] update website --- docs/getting-started.html | 2 +- docs/videos.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/getting-started.html b/docs/getting-started.html index 4ec9d1b2664..81dc558f45b 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -1,6 +1,6 @@ Getting Started – React Native | A framework for building native apps using React

Getting Started

Requirements #

  1. OS X - Only OS X is currently supported
  2. Homebrew is the recommended way to install io.js, watchman, and flow.
  3. Install io.js 1.0 or newer. io.js is the modern version of Node.
    • Install nvm with its setup instructions here. Then run nvm install iojs-v2 && nvm alias default iojs-v2, which installs the latest compatible version of io.js and sets up your terminal so that typing node runs io.js. With nvm you can install multiple versions of Node and io.js and easily switch between them.
    • New to npm?
  4. brew install watchman. We recommend installing watchman, otherwise you might hit a node file watching bug.
  5. brew install flow. If you want to use flow.

We recommend periodically running brew update && brew upgrade to keep your programs up-to-date.

iOS Setup #

Xcode 6.3 or higher is required. It can be installed from the App Store.

Android Setup #

To write React Native apps for Android, you will need to install the Android SDK (and an Android emulator if you want to work on your app without having to use a physical device). See Android setup guide for instructions on how to set up your Android environment.

Quick start #

$ npm install -g react-native-cli $ react-native init AwesomeProject -$ cd AwesomeProject/

To run the iOS app:

  • Open ios/AwesomeProject.xcodeproj and hit run in Xcode.
  • Open index.ios.js in your text editor of choice and edit some lines.
  • Hit ⌘-R in your iOS simulator to reload the app and see your change!

To run the Android app:

  • $ react-native run-android
  • Open index.android.js in your text editor of choice and edit some lines.
  • Press the menu button (F2 by default, or ⌘-M in Genymotion) and select Reload JS to see your change!
  • Run adb logcat *:S ReactNative:V ReactNativeJS:V in a terminal to see your app's logs

  • $ react-native run-android

  • Open index.android.js in your text editor of choice and edit some lines.
  • Press the menu button (F2 by default, or ⌘-M in Genymotion) and select Reload JS to see your change!
  • Run adb logcat *:S ReactNative:V ReactNativeJS:V in a terminal to see your app's logs

Congratulations! You've successfully run and modified your first React Native app.

If you run into any issues getting started, see the troubleshooting page.

Adding Android to an existing React Native project #

If you already have a (iOS-only) React Native project and want to add Android support, you need to execute the following commands in your existing project directory:

  1. Update the react-native dependency in your package.json file to the latest version
  2. $ npm install
  3. $ react-native android
© 2015 Facebook Inc.