Download the starter kit to get everything you need to get started with React. The starter kit includes React and some simple example apps.
We provide two versions of React: an uncompressed version for development and a minified version for production. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages.
If you're just starting out, make sure to use the development version.
The uncompressed, development version of react.js and react-dom.js with inline documentation (you need both files).
<script src="https://unpkg.com/[email protected]/dist/react.js"></script>
<script src="https://unpkg.com/[email protected]/dist/react-dom.js"></script>
The compressed, production version of react.js and react-dom.js (you need both).
<script src="https://unpkg.com/[email protected]/dist/react.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/react-dom.min.js"></script>
The uncompressed, development version of React with optional add-ons.
<script src="https://unpkg.com/[email protected]/dist/react-with-addons.js"></script>
<script src="https://unpkg.com/[email protected]/dist/react-dom.js"></script>
The compressed, production version of React with optional add-ons.
<script src="https://unpkg.com/[email protected]/dist/react-with-addons.min.js"></script>
<script src="https://unpkg.com/[email protected]/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.
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 install --save react