React学习(一)-----------------React安装

一、安装NODEJS

官网下载,傻瓜式安装。

二、安装create-react-app

使用淘宝镜像:

npm install -g cnpm --registry=https://registry.npm.taobao.org
npm config set registry https://registry.npm.taobao.org

安装:

cnpm install -g create-react-app

三、创建项目

在cmd中切换到需要创建项目的目录,运行:

create-react-app demo01

提示Success!后,启动项目:

npm start

浏览器将显示localhost:3000

四、修改项目

修改一下src/App.js里面的文件并保存可看到页面内容的变化。

 

基本环境部署挺简单,hello react!

原文地址:https://www.cnblogs.com/mcwym/p/9268669.html