You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The previous instructions may have come across that the only way to use Redux with npm was with a module bundler, like Browserify or Webpack.
This reorganizes the text in an effort to more explicitly explain that it's only the extensions require a CJS module bundler.
Copy file name to clipboardexpand all lines: README.md
+26-4
Original file line number
Diff line number
Diff line change
@@ -45,16 +45,38 @@ To install the stable version:
45
45
npm install --save redux
46
46
```
47
47
48
-
Most likely, you’ll also need [the React bindings](https://github.com/rackt/react-redux) and [the developer tools](https://github.com/gaearon/redux-devtools).
48
+
This requires using the [npm](https://www.npmjs.com/) package manager. It includes a [UMD](https://github.com/umdjs/umd) build, which is compatible with many popular JavaScript module loaders and environments.
49
+
50
+
#### Other Installation Methods
51
+
52
+
We **strongly** recommend using npm over these other options, as most of the [libraries complementary to Redux](#complementary-libraries) are only available on [npm](https://www.npmjs.com/).
53
+
54
+
However, if you don’t yet use [npm](https://www.npmjs.com/) or a modern module bundler, you have a few options.
55
+
56
+
##### Bower
57
+
58
+
If you're using Bower, this command will install the stable version of Redux:
Redux is available via [cdnjs](https://cdnjs.com/libraries/redux) and [npmcdn](https://npmcdn.com/redux/dist/redux.min.js). The files on these CDNs are UMD builds, which means that they will export a browser global, `window.redux`, if you're not using a tool like Webpack, Browserify, or RequireJS to build your library.
67
+
68
+
An example of using the global Redux object can be seen in [the vanilla counter example](https://github.com/rackt/redux/blob/765a3a5742a591adba7ae8b61e0516c49ca594bd/examples/counter-vanilla/index.html).
69
+
70
+
#### Complementary Libraries
71
+
72
+
Most likely, you’ll also need [the React bindings](https://github.com/rackt/react-redux) and [the developer tools](https://github.com/gaearon/redux-devtools) while working with Redux.
49
73
50
74
```
51
75
npm install --save react-redux
52
76
npm install --save-dev redux-devtools
53
77
```
54
78
55
-
This assumes that you’re using [npm](https://www.npmjs.com/) package manager with a module bundler like [Webpack](http://webpack.github.io) or [Browserify](http://browserify.org/) to consume [CommonJS modules](http://webpack.github.io/docs/commonjs.html).
56
-
57
-
If you don’t yet use [npm](https://www.npmjs.com/) or a modern module bundler, and would rather prefer a single-file [UMD](https://github.com/umdjs/umd) build that makes `Redux` available as a global object, you can grab a pre-built version from [cdnjs](https://cdnjs.com/libraries/redux). We *don’t* recommend this approach for any serious application, as most of the libraries complementary to Redux are only available on [npm](https://www.npmjs.com/).
79
+
Use of the extensions requires that you’re using [npm](https://www.npmjs.com/) in conjunction with a module bundler like [Webpack](http://webpack.github.io) or [Browserify](http://browserify.org/) to consume [CommonJS modules](http://webpack.github.io/docs/commonjs.html).
0 commit comments