Created
April 11, 2017 22:28
-
-
Save jschr/5af8bae57651525ef123251e65e3bdce to your computer and use it in GitHub Desktop.
Basic template step 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
export default function Template({ body, ssr, js }) { | |
return ( | |
<html> | |
<head> | |
<title>{ssr.appProps.username}</title> | |
</head> | |
<body> | |
<div id='react-root' dangerouslySetInnerHTML={{ __html: body }} /> | |
<script dangerouslySetInnerHTML={{ __html: `window.ssr = ${JSON.stringify(ssr)}` }} /> | |
{ js.map(src => <script src={src} />) } | |
</body> | |
</html> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment