美文网首页
react开发环境简单搭建

react开发环境简单搭建

作者: 冰清沧雨 | 来源:发表于2022-02-21 11:56 被阅读0次

1. 安装node.js

Node.js 安装包及源码下载地址为:https://nodejs.org/en/download/

2. 通过 npm 使用 React

国内使用 npm 速度很慢,可以使用淘宝定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm:

$ npm install -g cnpm --registry=https://registry.npmmirror.com
$ npm config set registry https://registry.npmmirror.com

3. 使用 create-react-app 快速构建 React 开发环境

$ cnpm install -g create-react-app
$ create-react-app my-app
$ cd my-app/
$ npm start

相关文章

网友评论

      本文标题:react开发环境简单搭建

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