0.4 Installing React 安装React

2017-03-10  本文已影响0人  人头原子弹

We recommend using Yarn or npm for managing front-end dependencies.

我们建议使用Yarn或npm来管理前端依赖关系。

If you're new to package managers, the Yarn documentation is a good place to get started.

如果你才开始接触包管理器,那么Yarn文档是作为开始的好地方。

To install React with Yarn, run:

使用Yarn安装React:

yarn init
yarn add react react-dom

To install React with npm, run:

使用npm安装React:

npm init
npm install --save react react-dom

Both Yarn and npm download packages from the npm registry.

yarn和npm都从npm工具站下载到包。

上一篇 下一篇

猜你喜欢

热点阅读