美文网首页
RN-1.Install

RN-1.Install

作者: 傻Xiao | 来源:发表于2018-01-03 21:34 被阅读0次

node

  • nvm管理node
    github地址
    1. 下载安装
      curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
    2. 设置环境变量
    export NVM_DIR="$HOME/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
    
    1. 一些nvm命令
    nvm ls    # 显示当前已安装版本
    nvm ls-remote    # 显示远程服务器版本
    nvm install <version>     # 安装指定版本
    nvm use <version>     # 使用指定版本
    

watchman

brew install watchman

Watchman is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance.

RN CLI

npm install -g react-native-cli

更新Xcode

create project

  1. 构建项目
    react-native init test
  2. 运行
    cd test
    react-native run-ios
    
  3. 看到Welcome to React Native!

相关文章

  • RN-1.Install

    node nvm管理nodegithub地址下载安装curl -o- https://raw.githubuser...

网友评论

      本文标题:RN-1.Install

      本文链接:https://www.haomeiwen.com/subject/bfmknxtx.html