react下载

react.js下载入门教程压缩包,里面有所有reactjs的文件。包含入门react组件和一些简单的例子应用程序。 下载你需要快速入门的reactjs压缩包,文件包中包括react和一些简单的例子应用.

开发版本和生产版本的react #

我们提供了两种版本的reactjs的文件下载,一种是开发版本,一种生产环境的版本(压缩版本),开发版的react包含常见的警告信息,但生产版本的会有更多的优化和错误信息展示。

如果你是reactjs的开发者,你应该选择react的开发版本.

个人下载#

React 16.0.0 (development) #

未压缩的的reactjs请点击这里 react.js下载 和未压缩的react-dom.js文件 react-dom.js .

<script src="https://unpkg.com/react@16.0.0/dist/react.js"></script>
<script src="https://unpkg.com/react-dom@16.0.0/dist/react-dom.js"></script>

React 16.0.0 (production) #

The compressed, production version of react.js and react-dom.js (you need both).

<script src="https://unpkg.com/react@16.0.0/dist/react.min.js"></script>
<script src="https://unpkg.com/react-dom@16.0.0/dist/react-dom.min.js"></script>

React with Add-Ons 16.0.0 (development) #

The uncompressed, development version of React with optional add-ons.

<script src="https://unpkg.com/react@16.0.0/dist/react-with-addons.js"></script>
<script src="https://unpkg.com/react-dom@16.0.0/dist/react-dom.js"></script>

React with Add-Ons 16.0.0 (production) #

The compressed, production version of React with optional add-ons.

<script src="https://unpkg.com/react@16.0.0/dist/react-with-addons.min.js"></script>
<script src="https://unpkg.com/react-dom@16.0.0/dist/react-dom.min.js"></script>

Note:

We're using unpkg to serve these files. This is a free service with the goal to provide a hassle-free CDN for npm package authors. React is also available on other free CDNs including cdnjs and jsDelivr. If you have concerns with relying on an external host, we always recommend that you download React and serve it from your own servers.

npm安装react #

We recommend using React from npm with a bundler like browserify or webpack. You can use the react and react-dom packages. After installing it using npm install --save react react-dom, you can use:

var React = require('react');
var ReactDOM = require('react-dom');
ReactDOM.render(<App />, ...);

Each of the add-ons lives in its own package.

Note: by default, React will be in development mode. To use React in production mode, set the environment variable NODE_ENV to production (using envify or webpack's DefinePlugin). A minifier that performs dead-code elimination such as UglifyJS is recommended to completely remove the extra code present in development mode.

Bower下载react #

$ bower install --save react

react历史版本下载