Skip to content

Commit eebd674

Browse files
committed
Fix a few grammatical errors/inconsistencies
1 parent 6ebbb03 commit eebd674

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

00_introduction.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,41 +47,41 @@
4747
// 3) Logic to retrieve data, glue all views together and to react accordingly to user events,
4848
// data modifications, etc. = Controller
4949

50-
// This is the very classic MVC that we all know about. But it actually look like concepts of flux,
50+
// This is the very classic MVC that we all know about. But it actually looks like concepts of flux,
5151
// just expressed in a slightly different way:
52-
// - Model look like store
52+
// - Models look like stores
5353
// - user events, data modifications and their handlers look like
5454
// "action creators" -> action -> dispatcher -> callback
55-
// - View look like React view (or anything else as far as Flux is concerned)
55+
// - Views look like React views (or anything else as far as Flux is concerned)
5656

57-
// So is flux just a matter of new vocabulary? Not exactly. But vocabulary DOES matter, because by introducing
57+
// So is Flux just a matter of new vocabulary? Not exactly. But vocabulary DOES matter, because by introducing
5858
// these new terms we are now able to express more precisely things that were regrouped under
5959
// various terminologies... For example, isn't a data fetch an action? just as a click is also an action?
60-
// and a change in an input is an action too... Then we are all already used to issue action from our
60+
// and a change in an input is an action too... Then, we are all already used to issuing actions from our
6161
// applications, we were just calling them differently. And instead of having handlers for those
62-
// actions modifying directly Models or Views, flux ensure all actions go first through something called
63-
// a dispatcher, then through our stores and finally all watchers of stores are notified.
62+
// actions directly modify Models or Views, Flux ensures all actions go first through something called
63+
// a dispatcher, then through our stores, and finally all watchers of stores are notified.
6464

6565
// To get more clearly how MVC and Flux differs, we'll
6666
// take a classic use-case in an MVC application:
6767
// In a classic MVC application you could easily end up with:
68-
// 1) user click on button "A"
69-
// 2) a click handler on button "A" trigger a change on Model "A"
70-
// 3) a change handler on Model "A" trigger a change on Model "B"
71-
// 4) a change handler on Model "B" trigger a change on view "B" that re-render itself
68+
// 1) user clicks on button "A"
69+
// 2) a click handler on button "A" triggers a change on Model "A"
70+
// 3) a change handler on Model "A" triggers a change on Model "B"
71+
// 4) a change handler on Model "B" triggers a change on View "B" that re-renders itself
7272

73-
// Finding the source of a bug in such an environment when something goes wrong can become quite a challenge
74-
// very quickly. This is because every View can watch every Model and every Model can watch other Models so
73+
// Finding the source of a bug in such an environment when something goes wrong can become quite challenging
74+
// very quickly. This is because every View can watch every Model, and every Model can watch other Models, so
7575
// basically data can arrive from a lot of places and be changed by a lot of sources (any views or any models).
7676

77-
// Whereas when using Flux and its unidirectional data flow the example above could become:
78-
// 1) user click on button "A"
79-
// 2) a handler on button "A" trigger an action that is dispatched and produce a change on store "A"
80-
// 3) since all others stores are also notified about the action, Store B can react to the same action too
81-
// 4) View "B" get notified by change in store A and B and re-render
77+
// Whereas when using Flux and its unidirectional data flow, the example above could become:
78+
// 1) user clicks on button "A"
79+
// 2) a handler on button "A" triggers an action that is dispatched and produces a change on Store "A"
80+
// 3) since all other stores are also notified about the action, Store B can react to the same action too
81+
// 4) View "B" gets notified by the change in Stores A and B, and re-renders
8282

83-
// See how we avoid to have store A being directly linked to store B? Each store can only be
84-
// modified by an action and nothing else. And once all stores replied to an action,
83+
// See how we avoid to have Store A being directly linked to Store B? Each store can only be
84+
// modified by an action and nothing else. And once all stores have replied to an action,
8585
// views can finally update. So in the end, data always flow in one way:
8686
// action -> store -> view -> action -> store -> view -> action -> ...
8787

0 commit comments

Comments
 (0)