先安裝Homebrew
/usr/bin/ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"
使用Homebrew來安裝Node.js
brew install node
npm install -g yarnreact-native-cli
嵌入到現有原生應用
npm init
npm install --save reactreact-native
curl -o .flowconfighttps://raw.githubusercontent.com/facebook/react-native/master/.flowconfig
直接創建一個rn項目
react-native initAwesomeProject