Update installation instructions on the blog
Dan Abramov committed
Nov 17, 2016 at 16:05 UTC
3d52856bb6e833c06ce885d10715069662c92a38
1 file changed
+24
-12
docs/_posts/2016-11-16-react-v15.4.0.md
+24
-12
@@ -96,26 +96,38 @@ You can learn more about snapshot testing in [this Jest blog post](https://faceb
96
97
## Installation
98
99
-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:
99
+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.
100
101
-* `npm install --save react@15.4.0 react-dom@15.4.0`
101
+To install React with Yarn, run:
102
103
-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.
103
+```bash
104
+yarn add react@15.4.0 react-dom@15.4.0
105
+```
106
+
107
+To install React with npm, run:
108
+
109
+```bash
110
+npm install --save react@15.4.0 react-dom@15.4.0
111
+```
112
+
113
+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.
114
+
115
+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).
116
105
-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.
117
+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:
118
119
* **React**
108
- Dev build with warnings: [react.js](https://unpkg.com/react@15.4.0/dist/react.js)
109
- Minified build for production: [react.min.js](https://unpkg.com/react@15.4.0/dist/react.min.js)
120
+ Dev build with warnings: [react/dist/react.js](https://unpkg.com/react@15.4.0/dist/react.js)
121
+ Minified build for production: [react/dist/react.min.js](https://unpkg.com/react@15.4.0/dist/react.min.js)
122
* **React with Add-Ons**
111
- Dev build with warnings: [react-with-addons.js](https://unpkg.com/react@15.4.0/dist/react-with-addons.js)
112
- Minified build for production: [react-with-addons.min.js](https://unpkg.com/react@15.4.0/dist/react-with-addons.min.js)
123
+ Dev build with warnings: [react/dist/react-with-addons.js](https://unpkg.com/react@15.4.0/dist/react-with-addons.js)
124
+ Minified build for production: [react/dist/react-with-addons.min.js](https://unpkg.com/react@15.4.0/dist/react-with-addons.min.js)
125
* **React DOM** (include React in the page before React DOM)
114
- Dev build with warnings: [react-dom.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom.js)
115
- Minified build for production: [react-dom.min.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom.min.js)
126
+ Dev build with warnings: [react-dom/dist/react-dom.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom.js)
127
+ Minified build for production: [react-dom/dist/react-dom.min.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom.min.js)
128
* **React DOM Server** (include React in the page before React DOM Server)
117
- Dev build with warnings: [react-dom-server.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom-server.js)
118
- Minified build for production: [react-dom-server.min.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom-server.min.js)
129
+ Dev build with warnings: [react-dom/dist/react-dom-server.js](https://unpkg.com/react-dom@15.4.0/dist/react-dom-server.js)
130
+ 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)
131
132
We've also published version `15.4.0` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower.
133