Skip to content

Instantly share code, notes, and snippets.

@osarrouy
Created January 24, 2019 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osarrouy/fdfffdbe53556b752e9193a2f87092f8 to your computer and use it in GitHub Desktop.
Save osarrouy/fdfffdbe53556b752e9193a2f87092f8 to your computer and use it in GitHub Desktop.
Event listener
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