Created
October 19, 2015 19:29
-
-
Save silouanwright/888d4e3e2fff9d361c13 to your computer and use it in GitHub Desktop.
Access useRoutes-enhanced history outside of components
This file contains hidden or 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
var temporaryHistory = useRoutes(createHistory)({ | |
routes: createRoutes(routes) | |
}); | |
let unlisten = temporaryHistory.listen(function(error, state) { | |
if (error){ | |
} else { | |
// Have to set the routes here somehow | |
console.log(state); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment