Skip to content

Commit

Permalink
Fix typo in Flux TodoMVC Tutorial
Browse files Browse the repository at this point in the history
A sentence says "only handles one actionType" when the example code instead handles two.
  • Loading branch information
gilbert committed May 25, 2014
1 parent e1457a1 commit 330fa30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/flux-todo-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ module.exports = TodoStore;

There are a few important things to note in the above code. To start, we are maintaining a private data structure called _todos. This object contains all the individual to-do items. Because this variable lives outside the class, but within the closure of the module, it remains private — it cannot be directly changed from the outside. This helps us preserve a distinct input/output interface for the flow of data by making it impossible to update the store without using an action.

Another important part is the registration of the store's callback with the dispatcher. We pass in our payload handling callback to the dispatcher and preserve the index that this store has in the dispatcher's registry. The callback function currently only handles one actionType, but later we can add as many as we need.
Another important part is the registration of the store's callback with the dispatcher. We pass in our payload handling callback to the dispatcher and preserve the index that this store has in the dispatcher's registry. The callback function currently only handles two actionTypes, but later we can add as many as we need.


Listening to Changes with a Controller-View
Expand Down

0 comments on commit 330fa30

Please sign in to comment.