Created
June 4, 2018 17:05
-
-
Save SaraVieira/719a9fed74a067019a7d197aa9eab0b1 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
import { StaticRouter } from 'react-router' | |
... | |
const context = {} | |
const Root = () => ( | |
<StaticRouter location={req.url} context={context}> | |
<App /> | |
</StaticRouter> | |
) | |
const markup = renderToString(<Root />); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment