Skip to content

Instantly share code, notes, and snippets.

@yoshuawuyts
Created May 19, 2017 10:35
Show Gist options
  • Save yoshuawuyts/aefbb8a707ff0f8b7e5d75cc63c709d1 to your computer and use it in GitHub Desktop.
Save yoshuawuyts/aefbb8a707ff0f8b7e5d75cc63c709d1 to your computer and use it in GitHub Desktop.
var app = choo()
app.use(function (state, emitter) {
emitter.on('DOMContentLoaded', function () {
emitter.emit('pushState', '/foo/bar') // make sure the app has loaded before firing anything
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment