Skip to content

Commit

Permalink
Merge pull request facebook#7 from cuth/patch-1
Browse files Browse the repository at this point in the history
Wait for CityStore token for all action types
  • Loading branch information
vjeux committed Jul 30, 2014
2 parents ace9c2a + 09966d5 commit bf9f01a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions docs/Dispatcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,14 @@ The usage of `waitFor()` can be chained, for example:

```
FlightPriceStore.dispatchToken =
flightDispatcher.register(function(payload)) {
flightDispatcher.register(function(payload) {
switch (payload.actionType) {
case 'country-update':
case 'city-update':
flightDispatcher.waitFor([CityStore.dispatchToken]);
FlightPriceStore.price =
getFlightPriceStore(CountryStore.country, CityStore.city);
break;
case 'city-update':
FlightPriceStore.price =
FlightPriceStore(CountryStore.country, CityStore.city);
break;
}
});
```
Expand Down

0 comments on commit bf9f01a

Please sign in to comment.