@ -96,26 +96,38 @@ You can learn more about snapshot testing in [this Jest blog post](https://faceb
## Installation
We recommend using React from `npm` and using a tool like browserify or webpack to build your code into a single bundle. To install the two packages:
We recommend using [Yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/) for managing front-end dependencies. If you're new to package managers, [Yarn documentation](https://yarnpkg.com/en/docs/getting-started) is a good place to get started.
Remember that by default, React runs extra checks and provides helpful warnings in development mode. When deploying your app, set the `NODE_ENV` environment variable to `production` to use the production build of React which does not include the development warnings and runs significantly faster.
```bash
yarn add react@15.4.0 react-dom@15.4.0
```
To install React with npm, run:
```bash
npm install --save react@15.4.0 react-dom@15.4.0
```
We recommend using a bundler like [webpack](https://webpack.github.io/) or [Browserify](http://browserify.org/) so you can write modular code and bundle it together into small packages to optimize load time.
Remember that by default, React runs extra checks and provides helpful warnings in development mode. When deploying your app, make sure to [compile it in production mode](/react/docs/installation.html#development-and-production-versions).
If you can’t use `npm` yet, we provide pre-built browser builds for your convenience, which are also available in the `react` package on bower.
In case you don't use a bundler, we also provide pre-built bundles in the npm packages which you can [include as script tags](/react/docs/installation.html#using-a-cdn) on your page:
* **React**
Dev build with warnings: [react.js](https://unpkg.com/react@15.4.0/dist/react.js)
Minified build for production: [react.min.js](https://unpkg.com/react@15.4.0/dist/react.min.js)
Dev build with warnings: [react/dist/react.js](https://unpkg.com/react@15.4.0/dist/react.js)
Minified build for production: [react/dist/react.min.js](https://unpkg.com/react@15.4.0/dist/react.min.js)
* **React with Add-Ons**
Dev build with warnings: [react-with-addons.js](https://unpkg.com/react@15.4.0/dist/react-with-addons.js)
Minified build for production: [react-with-addons.min.js](https://unpkg.com/react@15.4.0/dist/react-with-addons.min.js)
Dev build with warnings: [react/dist/react-with-addons.js](https://unpkg.com/react@15.4.0/dist/react-with-addons.js)
Minified build for production: [react/dist/react-with-addons.min.js](https://unpkg.com/react@15.4.0/dist/react-with-addons.min.js)
* **React DOM** (include React in the page before React DOM)
Dev build with warnings: [react-dom.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom.js)
Minified build for production: [react-dom.min.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom.min.js)
Dev build with warnings: [react-dom/dist/react-dom.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom.js)
Minified build for production: [react-dom/dist/react-dom.min.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom.min.js)
* **React DOM Server** (include React in the page before React DOM Server)
Dev build with warnings: [react-dom-server.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom-server.js)
Minified build for production: [react-dom-server.min.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom-server.min.js)
Dev build with warnings: [react-dom/dist/react-dom-server.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom-server.js)
Minified build for production: [react-dom/dist/react-dom-server.min.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom-server.min.js)
We've also published version `15.4.0` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower.