Skip to content

Instantly share code, notes, and snippets.

@DanielZhangQingLong
Created April 27, 2018 15:06
Show Gist options
  • Save DanielZhangQingLong/b9f3fb76118f2e6b0b5e63b58a58a5d0 to your computer and use it in GitHub Desktop.
Save DanielZhangQingLong/b9f3fb76118f2e6b0b5e63b58a58a5d0 to your computer and use it in GitHub Desktop.
Dispatcher register
import Dispatcher from '../dispatcher';
import SeniorStore from '../store/seniors.db';
const SeniorDispatcher = new Dispatcher();
SeniorDispatcher.register(function(action){
switch(action.actionType) {
case 'PLUS1S': {
console.log('PLUS1S');
SeniorStore.plus1s(action.url);
break;
}
}
});
export default SeniorDispatcher;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment