1.install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. Install nvm
brew install nvm
mkdir ~/.nvm
vi ~/.bash_profile
write
export NVM_DIR=~/.nvm
.$(brew --prefix nvm)/nvm.sh
and save it.
vi ~/.bash_profile
write
export NVM_DIR=~/.nvm
.$(brew --prefix nvm)/nvm.sh
and save it.
Close the command line and reopen it, enter the command
nvm --version
will prompt 0.31.0
3. Install watchman, flow
brew install watchman brew install flow
4. Install xocde
Enter the appstore, click xode to download and install
5. Install nodejs
nvm install node //This installation will take a long time, it is best to use vpn, otherwise the installation will be difficult
nvm alias default node
5. Install react native
npm install -g react-native-cli //It is difficult to download
6. Create a react native project
react-native init Awesome //Awesome project name