Skip to content

Commit

Permalink
Merge pull request facebook#1596 from mindeavor/patch-1
Browse files Browse the repository at this point in the history
Fix typo in Flux TodoMVC Tutorial
  • Loading branch information
zpao committed May 27, 2014
2 parents cd3ba59 + 330fa30 commit fa6fe54
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 fa6fe54

Please sign in to comment.