Created
October 26, 2016 20:15
-
-
Save kristoferblack/2ba0418f5521b76389b3acd2a05f3775 to your computer and use it in GitHub Desktop.
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
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