Browse Source

Fix typo in Flux TodoMVC Tutorial

A sentence says "only handles one actionType" when the example code instead handles two.
main
Gilbert 11 years ago
parent
commit
39fa3ffe39
  1. 2
      docs/flux-todo-list.md

2
docs/flux-todo-list.md

@ -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

Loading…
Cancel
Save