Created
December 10, 2018 03:21
-
-
Save takanorip/cceb5bf9c03a3452696a6300d7debed2 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
const Html = ({ content, state }) => ( | |
<html> | |
<body> | |
<div id="root" dangerouslySetInnerHTML={{ __html: content }} /> | |
<script dangerouslySetInnerHTML={{ | |
__html: `window.__APOLLO_STATE__=${JSON.stringify(state).replace(/</g, '\\u003c')};`, | |
}} /> | |
</body> | |
</html> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment