Add a note about production mode for npm installs.
Christopher Monsanto committed
Jul 5, 2014 at 20:50 UTC
9ddb4d4a78bde6ecdd7bf87c4beffb910b4d51d0
2 files changed
+5
docs/downloads.md
+2
@@ -76,6 +76,8 @@ React.renderComponent(...);
76
77
If you'd like to use any [add-ons](/react/docs/addons.html), use `var React = require('react/addons');` instead.
78
79
+**Note:** by default, React will be in development mode. To use React in production mode, set the environment variable `NODE_ENV` to `production`. For use in node, this is sufficient; if you are using browserify, the [envify](https://github.com/hughsk/envify) transform is needed to make use of environment variables. A minifier that performs dead-code elimination such as [UglifyJS](https://github.com/mishoo/UglifyJS2) is recommended to completely remove the extra code present in development mode.
80
+
81
## Bower
82
83
```sh
npm-react/README.md
+3
@@ -5,6 +5,9 @@ without also requiring the JSX transformer. This is especially useful for cases
5
want to [`browserify`](https://github.com/substack/node-browserify) your module using
6
`React`.
7
8
+**Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages.
9
+
10
+To use React in production mode, set the environment variable `NODE_ENV` to `production`. For use in node, this is sufficient; if you are using browserify, the [envify](https://github.com/hughsk/envify) transform is needed to make use of environment variables. A minifier that performs dead-code elimination such as [UglifyJS](https://github.com/mishoo/UglifyJS2) is recommended to completely remove the extra code present in development mode.
11
12
## Example Usage
13