Created
April 27, 2018 15:06
-
-
Save DanielZhangQingLong/b9f3fb76118f2e6b0b5e63b58a58a5d0 to your computer and use it in GitHub Desktop.
Dispatcher register
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
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