Last active
February 7, 2016 22:06
-
-
Save kahlil/c705a3606cc9db189d09 to your computer and use it in GitHub Desktop.
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 ACTION_CONSTANTS from '../../constant/action-constants'; | |
import Rx from 'rx'; | |
class SomeStore { | |
constructor(dispatcher) { | |
'ngInject'; | |
this.dispatcher = dispatcher; | |
this.someStore$ = this.registerActionHandlers(); | |
} | |
registerActionHandlers() { | |
return this.dispatcher | |
.filter((action) => action === ACTION_CONSTANTS.SOME_ACTION) | |
.scan((someState, action) => !someState, false); | |
} | |
} | |
export default SomeStore; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment