Skip to content

Instantly share code, notes, and snippets.

@yoshuawuyts
Last active March 6, 2018 15:33
Show Gist options
  • Save yoshuawuyts/aac6310d76f2f22c6a3692b10a2d362b to your computer and use it in GitHub Desktop.
Save yoshuawuyts/aac6310d76f2f22c6a3692b10a2d362b to your computer and use it in GitHub Desktop.
var { App } = require('choo')
var app = new App()
app.store(import('./stores/my-store'))
app.render('body')
var { Store } = require('choo')
export class myStore extends Store {
static get name () {
return 'my-store'
}
load () {
this.emitter.on('foo', this.foo)
}
foo () {
this.emitter.emit('log:info', 'hello world')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment