-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44af732
commit c104fb7
Showing
5 changed files
with
132 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = makeFinalStore | ||
|
||
function FinalStore() { | ||
this.dispatcher.register(function (payload) { | ||
var stores = Object.keys(this.alt.stores).reduce(function (arr, store) { | ||
return arr.push(this.alt.stores[store].dispatchToken), arr | ||
}.bind(this), []) | ||
|
||
this.waitFor(stores) | ||
this.getInstance().emitChange() | ||
}.bind(this)) | ||
} | ||
|
||
function makeFinalStore(alt) { | ||
return alt.createStore(FinalStore, 'AltFinalStore', false) | ||
} |