ReactNative 簡介
ReactNative 於2015年被 Facebook 開源。
基於 JavaScript ,動態加載並編譯Virtual-DOM,可同時運行於Android、iOS、Browser各個平臺。
在Android上依賴於webkit.org官方開源的jsc.so。
ReactNative 環境配置
下面只介紹 macOS 開發平臺下的 Android 環境配置 [參考ReactNative環境搭建]
* 安裝 HomeBrew, Mac 系統的包管理器
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
* 安裝 Node.js, JavaScript 的運行環境
brew install node
* 設置 npm 鏡像以加速, npm 是 Node.js 的模塊依賴管理工具
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
* 安裝 react-native-cli, ReactNative 的命令行工具
npm install -g react-native-cli
* 安裝 watchman, 監視文件系統變更的工具
brew install watchman