Created
March 19, 2017 23:34
-
-
Save Maarten88/a739793a3ad48e33b016d7b201beec1f to your computer and use it in GitHub Desktop.
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
[...] | |
export default createServerRenderer(params => { | |
return new Promise<RenderResult>((resolve, reject) => { | |
// Match the incoming request against the list of client-side routes | |
match({ routes, location: params.location }, (error, redirectLocation, renderProps: any) => { | |
[...] | |
// Build an instance of the application | |
const store = configureStore(); | |
store.dispatch({ type: INIT_SESSION, payload: { xsrfToken: params.data.xsrfToken, id: params.data.sessionId } }); | |
[...] | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment