From 9ddb4d4a78bde6ecdd7bf87c4beffb910b4d51d0 Mon Sep 17 00:00:00 2001 From: Christopher Monsanto Date: Sat, 5 Jul 2014 20:50:00 -0400 Subject: [PATCH 1/2] Add a note about production mode for npm installs. --- docs/downloads.md | 2 ++ npm-react/README.md | 3 +++ 2 files changed, 5 insertions(+) diff --git a/docs/downloads.md b/docs/downloads.md index 0888d99f416..769c6b6ec9f 100644 --- a/docs/downloads.md +++ b/docs/downloads.md @@ -76,6 +76,8 @@ React.renderComponent(...); If you'd like to use any [add-ons](/react/docs/addons.html), use `var React = require('react/addons');` instead. +**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. + ## Bower ```sh diff --git a/npm-react/README.md b/npm-react/README.md index e77fe6f0d9c..b893636f4e0 100644 --- a/npm-react/README.md +++ b/npm-react/README.md @@ -5,6 +5,9 @@ without also requiring the JSX transformer. This is especially useful for cases want to [`browserify`](https://github.com/substack/node-browserify) your module using `React`. +**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. + +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. ## Example Usage From 39ac88595d0d89beb89ffd598d4a6de1f3b3fee8 Mon Sep 17 00:00:00 2001 From: Christopher Monsanto Date: Mon, 7 Jul 2014 15:00:47 -0400 Subject: [PATCH 2/2] Remove mention of envify since it is listed in package.json --- docs/downloads.md | 2 +- npm-react/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/downloads.md b/docs/downloads.md index 769c6b6ec9f..accfa3cc36b 100644 --- a/docs/downloads.md +++ b/docs/downloads.md @@ -76,7 +76,7 @@ React.renderComponent(...); If you'd like to use any [add-ons](/react/docs/addons.html), use `var React = require('react/addons');` instead. -**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. +**Note:** by default, React will be in development mode. To use React in production mode, set the environment variable `NODE_ENV` to `production`. 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. ## Bower diff --git a/npm-react/README.md b/npm-react/README.md index b893636f4e0..5821d8f5681 100644 --- a/npm-react/README.md +++ b/npm-react/README.md @@ -7,7 +7,7 @@ want to [`browserify`](https://github.com/substack/node-browserify) your module **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. -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. +To use React in production mode, set the environment variable `NODE_ENV` to `production`. 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. ## Example Usage