Last active
August 29, 2015 14:27
-
-
Save tomchentw/9afb40c8ffec3eee3df6 to your computer and use it in GitHub Desktop.
Redux-Universal - Code Sections - 1
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
| // http://git.io/v3Itp | |
| // our routes returns a factory function, pass in the Redux store to initialize it | |
| const routes = require("./routes")(store); | |
| // create server-side location from the request instance provided by express | |
| const location = new Location(request.path, request.query); | |
| // promisified version of Router.run to resolve components for a given location | |
| return runRouter(routes, location).then(([routerState, transition]) => { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment