mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-09 22:24:26 +02:00
global state store
This commit is contained in:
parent
8493b51ec2
commit
e03bdc619f
5 changed files with 95 additions and 12 deletions
|
@ -2,9 +2,24 @@
|
|||
|
||||
var keyMirror = require('react/lib/keyMirror');
|
||||
|
||||
var CHANGE_EVENT = 'change';
|
||||
|
||||
module.exports = {
|
||||
|
||||
CHANGE_EVENT: CHANGE_EVENT,
|
||||
|
||||
StoreSubscribePrototype: {
|
||||
subscribe: function(cb) {
|
||||
this.on(CHANGE_EVENT, cb);
|
||||
},
|
||||
|
||||
unsubscribe: function(cb) {
|
||||
this.removeListener(CHANGE_EVENT, cb);
|
||||
}
|
||||
},
|
||||
|
||||
ActionTypes: keyMirror({
|
||||
CHANGE_IS_ANIMATING: null,
|
||||
SUBMIT_COMMAND: null,
|
||||
CHANGE_LOCALE: null,
|
||||
CHANGE_LOCALE_FROM_HEADER: null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue