Created
January 24, 2019 09:58
-
-
Save osarrouy/fdfffdbe53556b752e9193a2f87092f8 to your computer and use it in GitHub Desktop.
Event listener
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
const reducer = (state, event) => { | |
// handle all events including the future one from upcoming organism votes | |
case 'NewOrganism': | |
const organism = app.external(organismAddress, organismJsonInterface) | |
$state = app.store(reducer, [organism.events()]) | |
} | |
let state$ = app.store(reducer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment