Steps
- Http://facebook.github.io/react-native/docs/getting-started.html#content
Follow the steps of the react native website step by step installation, record for example
1. Install homebrew (enter the command at the command terminal according to the official website)
2. Install NVM (Node version manager), which is the installation downloader for node. js.
(1) command terminal->git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout ' git desc Ribe--abbrev=0-tags ' (because. NVM is not a valid naming method under Folder view.) Therefore, the folder view does not see the folder. Can only be entered under the command line)
(2) Specify the location of the nvm.sh for the MAC system
Command Terminal->source ~/.nvm/nvm.sh or. ~/.nvm/nvm.sh.
(3) Add System Folder NVM
To avoid specifying the location of the nvm.sh each time, you can join the boot configuration for the command terminal
* Configuration ~/.profile
Command Terminal->touch ~/.profile
OPEN-E!$
will open the profile file and join
Export nvm_dir= "$HOME/.NVM"
[-S "$NVM _dir/nvm.sh"] &&. "$NVM _dir/nvm.sh" # this loads NVM
* Configuration ~/.BASHRC (not configurable?) )
Step above
3. Install node. js
Now that the NVM has been installed in the previous step, it is now possible to install the latest version of node. js with NVM.
Command Terminal->NVM install node && NVM alias default node
4. Follow the official website steps. At the command terminal one-time input command, install Watchman, flow
(1) command terminal->brew install Watchman
(2) command terminal->brew Install flow
5. Install React navtive Client
Command Terminal->npm install-g react-native-cli (Npm:node package Manager)
6.Quick Start
Ok! is now fully equipped with react Native, and can now generate instance programs with Native!
Command Terminal->react-native INIT project name
React native will generate the corresponding project under your user root folder. and includes a simple code implementation.
React Native mac Configuration Guide