mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-06 22:44:22 +08:00
2.0 KiB
2.0 KiB
id, title, layout, category, permalink, next
| id | title | layout | category | permalink | next |
|---|---|---|---|---|---|
| getting-started | Getting Started | docs | Quick Start | docs/getting-started.html | tutorial |
Requirements
- OS X - This repo only contains the iOS (7+) implementation right now, and Xcode only runs on Mac.
- Xcode 6.3 or higher is recommended.
- Homebrew is the recommended way to install io.js, watchman, and flow.
- Install io.js 1.0 or newer. io.js is the modern version of Node.
- With nvm: 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 typingnoderuns io.js. With nvm you can install multiple versions of Node and io.js and easily switch between them. - With Homebrew: Run
brew install iojs && brew link iojs --force. You may need to runbrew unlink nodeif you have previously installed Node. - New to npm?
brew install watchman. We recommend installing watchman, otherwise you might hit a node file watching bug.brew install flow. If you want to use flow.
We recommend periodically running brew update && brew upgrade to keep your programs up-to-date.
Quick start
npm install -g react-native-clireact-native init AwesomeProject
In the newly created folder AwesomeProject/
- Open
AwesomeProject.xcodeprojand hit run in Xcode. - Open
index.ios.jsin your text editor of choice and edit some lines. - Hit cmd+R in your iOS simulator to reload the app and see your change!
Congratulations! You've just successfully run and modified your first React Native app.
If you run into any issues getting started, see the troubleshooting page.