Skip to content

Instantly share code, notes, and snippets.

@kristoferblack
Created October 26, 2016 20:15
Show Gist options
  • Save kristoferblack/2ba0418f5521b76389b3acd2a05f3775 to your computer and use it in GitHub Desktop.
Save kristoferblack/2ba0418f5521b76389b3acd2a05f3775 to your computer and use it in GitHub Desktop.
Meteor.startup(() => {
GlobalEmitter = new EventEmitter()
ReactRouterSSR.Run(renderRoutes, {
props: {
onUpdate() {
GlobalEmitter.emit('closeMobileNav')
ReactGA.pageview(this.state.location.pathname)
}
}
}, {
htmlHook(html) {
const head = Helmet.rewind()
return html.replace('<head>', '<head>' + head.title + head.base + head.meta + head.link + head.script)
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment