@@ -0,0 +1,1034 @@
+import AppDispatcher from %22../dispatcher/AppDispatcher.js%22%0Aimport %7BEventEmitter%7D from %22events%22%0Aimport React from %22react%22%0Aimport assign from %22object-assign%22%0A%0Aimport %3CNAME%3Econstants from %22../constants/%3C%3Econstants.js%22%0A%0Aconst ActionTypes = %3CNAME%3Econstants.ActionTypes%0A%0Alet _store = %7B%7D%0A%0Aconst %3CNAME%3EStore = assign(%7B%7D, EventEmitter.prototype, %7B%0A%0A    getSOMETHING: function() %7B%0A      return _store.something;%0A    %7D,%0A%0A    emitChange: function() %7B%0A      this.emit('change');%0A    %7D,%0A%0A    addChangeListener: function(callback) %7B%0A      this.on('change', callback);%0A    %7D,%0A%0A    removeChangeListener: function(callback) %7B%0A      this.removeListener('change', callback);%0A    %7D%0A%0A%0A%7D)%0A%0A%0AAppDispatcher.register(function(action) %7B%0A  // var text;%0A  // Define what to do for certain actions%0A  console.log(action.data);%0A  switch(action.type) %7B%0A%0A    case ActionTypes.ACTIONNAME:%0A      someAction(action.data);%0A      break;%0A%0A    default:%0A      return true;%0A  %7D%0A%0A  // If action was acted upon, emit change event%0A  ExampleStore.emitChange();%0A%0A  return true;%0A%0A%7D)%0A

store template and dispatcher (#19)