Skip to content

Commit 10233e3

Browse files
committed
Update 03_about-state-and-meet-redux.js
Him to it as we're talking about a library rather than a person. Various changes to sentence fragments. Not keen on this line // Using subscribers to state's modifications.
1 parent e30e1d8 commit 10233e3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

03_about-state-and-meet-redux.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Tutorial 3 - about-state-and-meet-redux.js
22

3-
// Sometimes, the actions that we'll handle in our application will not only be made to inform us
4-
// that something happened but also to tell us that a data needs to be updated.
3+
// Sometimes the actions that we'll handle in our application will not only inform us
4+
// that something happened but also tell us that data needs to be updated.
55

66
// This is actually quite a big challenge in any apps.
77
// Where do I keep all the data regarding my application along its lifetime?
@@ -12,13 +12,13 @@
1212

1313
// Redux (https://github.com/gaearon/redux) is a "predictable state container for JavaScript apps"
1414

15-
// Let's take again those questions above and reply to them with
15+
// Let's review the above questions and reply to them with
1616
// Redux vocabulary (flux vocabulary too for some of them):
1717

1818
// Where do I keep all the data regarding my application along its lifetime?
1919
// You keep it the way you want (JS object, array, Immutable structure, ...).
2020
// Data of your application will be called state. Makes sense since we're talking about
21-
// all the application's data that will evolve over time, it's really the application's state.
21+
// all the applications data that will evolve over time, it's really the applications state.
2222
// But you hand it over to Redux (Redux is "state container", remember?).
2323
// How do I handle modification of such data?
2424
// Using reducers.
@@ -28,22 +28,22 @@
2828
// How do I propagate modifications to all parts of my application?
2929
// Using subscribers to state's modifications.
3030

31-
// Redux tie all this up together for you.
31+
// Redux ties all this together for you.
3232
// To sum up, Redux will provide you:
3333
// 1) a place to put your application state
3434
// 2) a mechanism to subscribe to state updates
35-
// 3) a mechanism to dispatch actions to modifiers of your application state AKA reducers
35+
// 3) a mechanism to dispatch actions to modifiers of your application state, AKA reducers
3636

3737
// The Redux instance is called a store and can be created like this:
3838
/*
3939
import { createStore } from 'redux'
4040
var store = createStore()
4141
*/
4242

43-
// but if you run the code above, you'll notice that it throw an error:
43+
// But if you run the code above, you'll notice that it throw an error:
4444
// Error: Invariant Violation: Expected the reducer to be a function.
4545

46-
// That's because createStore expect at least a function that will allow him to reduce your state
46+
// That's because createStore expects a function that will allow it to reduce your state.
4747

4848
// Let's try again
4949

@@ -53,4 +53,4 @@ var store = createStore(() => {})
5353

5454
// Seems good for now...
5555

56-
// Go to next tutorial: simple-reducer.js
56+
// Go to next tutorial: simple-reducer.js

0 commit comments

Comments
 (0)