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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,19 @@ We are open to, and grateful for, any contributions made by the community. By co
4
4
5
5
## Reporting Issues and Asking Questions
6
6
7
-
Before opening an issue, please search the [issue tracker](https://github.com/reactjs/redux/issues) to make sure your issue hasn’t already been reported.
7
+
Before opening an issue, please search the [issue tracker](https://github.com/reactjs/redux/issues) to make sure your issue hasn't already been reported.
8
8
9
9
### Bugs and Improvements
10
10
11
11
We use the issue tracker to keep track of bugs and improvements to Redux itself, its examples, and the documentation. We encourage you to open issues to discuss improvements, architecture, theory, internal implementation, etc. If a topic has been discussed before, we will ask you to join the previous discussion.
12
12
13
13
### Getting Help
14
14
15
-
**For support or usage questions like “how do I do X with Redux” and “my code doesn’t work”, please search and ask on [StackOverflow with a Redux tag](http://stackoverflow.com/questions/tagged/redux?sort=votes&pageSize=50) first.**
15
+
**For support or usage questions like “how do I do X with Redux” and “my code doesn't work”, please search and ask on [StackOverflow with a Redux tag](http://stackoverflow.com/questions/tagged/redux?sort=votes&pageSize=50) first.**
16
16
17
17
We ask you to do this because StackOverflow has a much better job at keeping popular questions visible. Unfortunately good answers get lost and outdated on GitHub.
18
18
19
-
Some questions take a long time to get an answer. **If your question gets closed or you don’t get a reply on StackOverflow for longer than a few days,** we encourage you to post an issue linking to your question. We will close your issue but this will give people watching the repo an opportunity to see your question and reply to it on StackOverflow if they know the answer.
19
+
Some questions take a long time to get an answer. **If your question gets closed or you don't get a reply on StackOverflow for longer than a few days,** we encourage you to post an issue linking to your question. We will close your issue but this will give people watching the repo an opportunity to see your question and reply to it on StackOverflow if they know the answer.
20
20
21
21
Please be considerate when doing this as this is not the primary purpose of the issue tracker.
22
22
@@ -89,7 +89,7 @@ npm run test:watch
89
89
90
90
### Docs
91
91
92
-
Improvements to the documentation are always welcome. In the docs we abide by typographic rules, so instead of ' you should use ’. Same goes for “ ” and dashes (—) where appropriate. These rules only apply to the text, not to code blocks.
92
+
Improvements to the documentation are always welcome. In the docs we abide by typographic rules, so instead of ' you should use '. Same goes for “ ” and dashes (—) where appropriate. These rules only apply to the text, not to code blocks.
93
93
94
94
#### Installing Gitbook
95
95
@@ -152,7 +152,7 @@ Please visit the [Examples page](http://redux.js.org/docs/introduction/Examples.
152
152
153
153
### Sending a Pull Request
154
154
155
-
For non-trivial changes, please open an issue with a proposal for a new feature or refactoring before starting on the work. We don’t want you to waste your efforts on a pull request that we won’t want to accept.
155
+
For non-trivial changes, please open an issue with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept.
156
156
157
157
On the other hand, sometimes the best way to start a conversation *is* to send a pull request. Use your best judgement!
158
158
@@ -166,6 +166,6 @@ In general, the contribution workflow looks like this:
166
166
167
167
Please try to keep your pull request focused in scope and avoid including unrelated commits.
168
168
169
-
After you have submitted your pull request, we’ll try to get back to you as soon as possible. We may suggest some changes or improvements.
169
+
After you have submitted your pull request, we'll try to get back to you as soon as possible. We may suggest some changes or improvements.
Redux is a predictable state container for JavaScript apps.
4
-
(If you’re looking for a WordPress framework, check out [Redux Framework](https://reduxframework.com/).)
4
+
(If you're looking for a WordPress framework, check out [Redux Framework](https://reduxframework.com/).)
5
5
6
6
It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as [live code editing combined with a time traveling debugger](https://github.com/gaearon/redux-devtools).
7
7
@@ -20,7 +20,7 @@ It is tiny (2kB, including dependencies).
20
20
21
21
### Testimonials
22
22
23
-
>[“Love what you’re doing with Redux”](https://twitter.com/jingc/status/616608251463909376)
23
+
>[“Love what you're doing with Redux”](https://twitter.com/jingc/status/616608251463909376)
24
24
>Jing Chen, creator of Flux
25
25
26
26
>[“I asked for comments on Redux in FB's internal JS discussion group, and it was universally praised. Really awesome work.”](https://twitter.com/fisherwebdev/status/616286955693682688)
@@ -47,32 +47,32 @@ npm install --save redux
47
47
```
48
48
49
49
This assumes you are using [npm](https://www.npmjs.com/) as your package manager.
50
-
If you don’t, you can [access these files on npmcdn](https://npmcdn.com/redux/), download them, or point your package manager to them.
50
+
If you don't, you can [access these files on npmcdn](https://npmcdn.com/redux/), download them, or point your package manager to them.
51
51
52
52
Most commonly people consume Redux as a collection of [CommonJS](http://webpack.github.io/docs/commonjs.html) modules. These modules are what you get when you import `redux` in a [Webpack](http://webpack.github.io), [Browserify](http://browserify.org/), or a Node environment. If you like to live on the edge and use [Rollup](http://rollupjs.org), we support that as well.
53
53
54
-
If you don’t use a module bundler, it’s also fine. The `redux` npm package includes precompiled production and development [UMD](https://github.com/umdjs/umd) builds in the [`dist` folder](https://npmcdn.com/redux/dist/). They can be used directly without a bundler and are thus compatible with many popular JavaScript module loaders and environments. For example, you can drop a UMD build as a [`<script>` tag](https://npmcdn.com/redux/dist/redux.js) on the page, or [tell Bower to install it](https://github.com/reactjs/redux/pull/1181#issuecomment-167361975). The UMD builds make Redux available as a `window.Redux` global variable.
54
+
If you don't use a module bundler, it's also fine. The `redux` npm package includes precompiled production and development [UMD](https://github.com/umdjs/umd) builds in the [`dist` folder](https://npmcdn.com/redux/dist/). They can be used directly without a bundler and are thus compatible with many popular JavaScript module loaders and environments. For example, you can drop a UMD build as a [`<script>` tag](https://npmcdn.com/redux/dist/redux.js) on the page, or [tell Bower to install it](https://github.com/reactjs/redux/pull/1181#issuecomment-167361975). The UMD builds make Redux available as a `window.Redux` global variable.
55
55
56
-
The Redux source code is written in ES2015 but we precompile both CommonJS and UMD builds to ES5 so they work in [any modern browser](http://caniuse.com/#feat=es5). You don’t need to use Babel or a module bundler to [get started with Redux](https://github.com/reactjs/redux/blob/master/examples/counter-vanilla/index.html).
56
+
The Redux source code is written in ES2015 but we precompile both CommonJS and UMD builds to ES5 so they work in [any modern browser](http://caniuse.com/#feat=es5). You don't need to use Babel or a module bundler to [get started with Redux](https://github.com/reactjs/redux/blob/master/examples/counter-vanilla/index.html).
57
57
58
58
#### Complementary Packages
59
59
60
-
Most likely, you’ll also need [the React bindings](https://github.com/reactjs/react-redux) and [the developer tools](https://github.com/gaearon/redux-devtools).
60
+
Most likely, you'll also need [the React bindings](https://github.com/reactjs/react-redux) and [the developer tools](https://github.com/gaearon/redux-devtools).
61
61
62
62
```
63
63
npm install --save react-redux
64
64
npm install --save-dev redux-devtools
65
65
```
66
66
67
-
Note that unlike Redux itself, many packages in the Redux ecosystem don’t provide UMD builds, so we recommend using CommonJS module bundlers like [Webpack](http://webpack.github.io) and [Browserify](http://browserify.org/) for the most comfortable development experience.
67
+
Note that unlike Redux itself, many packages in the Redux ecosystem don't provide UMD builds, so we recommend using CommonJS module bundlers like [Webpack](http://webpack.github.io) and [Browserify](http://browserify.org/) for the most comfortable development experience.
68
68
69
69
### The Gist
70
70
71
71
The whole state of your app is stored in an object tree inside a single *store*.
72
72
The only way to change the state tree is to emit an *action*, an object describing what happened.
73
73
To specify how the actions transform the state tree, you write pure *reducers*.
74
74
75
-
That’s it!
75
+
That's it!
76
76
77
77
```js
78
78
import { createStore } from'redux'
@@ -105,7 +105,7 @@ function counter(state = 0, action) {
105
105
let store =createStore(counter)
106
106
107
107
// You can use subscribe() to update the UI in response to state changes.
108
-
// Normally you’d use a view binding library (e.g. React Redux) rather than subscribe() directly.
108
+
// Normally you'd use a view binding library (e.g. React Redux) rather than subscribe() directly.
109
109
// However it can also be handy to persist the current state in the localStorage.
Instead of mutating the state directly, you specify the mutations you want to happen with plain objects called *actions*. Then you write a special function called a *reducer* to decide how every action transforms the entire application’s state.
125
+
Instead of mutating the state directly, you specify the mutations you want to happen with plain objects called *actions*. Then you write a special function called a *reducer* to decide how every action transforms the entire application's state.
126
126
127
-
If you’re coming from Flux, there is a single important difference you need to understand. Redux doesn’t have a Dispatcher or support many stores. Instead, there is just a single store with a single root reducing function. As your app grows, instead of adding stores, you split the root reducer into smaller reducers independently operating on the different parts of the state tree. This is exactly like there is just one root component in a React app, but it is composed out of many small components.
127
+
If you're coming from Flux, there is a single important difference you need to understand. Redux doesn't have a Dispatcher or support many stores. Instead, there is just a single store with a single root reducing function. As your app grows, instead of adding stores, you split the root reducer into smaller reducers independently operating on the different parts of the state tree. This is exactly like there is just one root component in a React app, but it is composed out of many small components.
128
128
129
129
This architecture might seem like an overkill for a counter app, but the beauty of this pattern is how well it scales to large and complex apps. It also enables very powerful developer tools, because it is possible to trace every mutation to the action that caused it. You can record user sessions and reproduce them just by replaying every action.
130
130
@@ -151,7 +151,7 @@ So, what are you waiting for?
151
151
152
152
#### [Watch the 30 Free Videos!](https://egghead.io/series/getting-started-with-redux)
153
153
154
-
If you enjoyed my course, consider supporting Egghead by [buying a subscription](https://egghead.io/pricing). Subscribers have access to the source code for the example in every one of my videos, as well as to tons of advanced lessons on other topics, including JavaScript in depth, React, Angular, and more. Many [Egghead instructors](https://egghead.io/instructors) are also open source library authors, so buying a subscription is a nice way to thank them for the work that they’ve done.
154
+
If you enjoyed my course, consider supporting Egghead by [buying a subscription](https://egghead.io/pricing). Subscribers have access to the source code for the example in every one of my videos, as well as to tons of advanced lessons on other topics, including JavaScript in depth, React, Angular, and more. Many [Egghead instructors](https://egghead.io/instructors) are also open source library authors, so buying a subscription is a nice way to thank them for the work that they've done.
155
155
156
156
### Documentation
157
157
@@ -178,7 +178,7 @@ For PDF, ePub, and MOBI exports for offline reading, and instructions on how to
If you’re new to the NPM ecosystem and have troubles getting a project up and running, or aren’t sure where to paste the gist above, check out [simplest-redux-example](https://github.com/jackielii/simplest-redux-example) that uses Redux together with React and Browserify.
181
+
If you're new to the NPM ecosystem and have troubles getting a project up and running, or aren't sure where to paste the gist above, check out [simplest-redux-example](https://github.com/jackielii/simplest-redux-example) that uses Redux together with React and Browserify.
0 commit comments