react简书笔记一 环境, git 和 项目 关联

1.. 创建git项目  ( 码云, github 均可以 ), 具体步骤: https://www.cnblogs.com/andy-lehhaxm/p/10720717.htmlhtml

  1.1  git 和  项目 关联:  git   remote   add  origin   gti@gitee.com/CMCC_10086/reactJianShu.git  ( git  remote add  origin  单词顺序不能错 )node

  1.2  再 git  add  . --> git  commit -m '' --> git push  react

  1.3  git  push  提示错误  reject 时,   须要手动消除差别 https://www.cnblogs.com/andy-lehhaxm/p/10787996.htmlgit

      git pull origin master --allow-unrelated-histories //把远程仓库和本地同步,消除差别,  须要从新add .  提交  pushgithub

2.. 经过react脚手架工具, 建立初始化本项目    ( 项目名不能有大写字母 )npm

  2.1 先安装脚手架:   npm  install -g  create-react-appapp

  2.2 使用脚手架创建项目:   create-react-app   myProgramNameide

  ( 或者--react官方--2.3  或者用  npx create-react-app  myProgramName       https://reactjs.org/docs/create-a-new-react-app.html )工具

    npx 是node>=6, 且 npm>=5.2 新引入的命令spa

npx create-react-app my-app
cd my-app
npm start
React官方Create New React App
相关文章
相关标签/搜索