React Native环境搭建
学习资料
react native 官网
官方文档 是学习的第一手资料,也是最优资料
深入浅出 React Native:使用 JavaScript 构建原生应用
安装步骤
- 安装node.js
 node.js官网
 brew install node
 React native 利用 Node.js 来搭建 JavaScript 代码
- 安装watchman
 watchman 官网
 brew install watchman
 Watchman 是 facebook 的一个开源项目,它开源用来监视文件并且记录文件的改动情况,当文件变更它可以触发一些操作,例如执行一些命令等等
- 安装flow
 flow官网
 brew install flow
 开源的 JavaScript 静态类型检查器,旨在发现 JS 程序中的类型错误,以提高程序员的效率和代码质量
- 安装 React Native CLI 工具
 npm install -g react-native-cli
 React Native 可以让我们使用 react-native-cli npm 包 CLI 快速开始一个项目…我们设置可以在Chrome的开发者工具中调试我们的代码
至此,react-native环境已经搭建完成。
➜   react-native -h
  Usage: react-native [command] [options]
  Commands:
    init <ProjectName> [options]  generates a new project and installs its dependencies
  Options:
    -h, --help    output usage information
    -v, --version output the version number
如果想初始化一个项目,请执行:
react-native init helloworld
 
                    
                 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号