Skip to content

Instantly share code, notes, and snippets.

@tolmasky
Created October 17, 2014 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tolmasky/34bf9eb7bb47efad019f to your computer and use it in GitHub Desktop.
Save tolmasky/34bf9eb7bb47efad019f to your computer and use it in GitHub Desktop.
var everything = React.createElement(
{
render: return <html>
<body>
<mycomponent model = { model } />
<script>
{
"model = " + JSON.stringify(modle) + ";" +
"React.renderComponent(<everything />), document);"
}
</script>
</body>
</html>
});
writeToClient(React.renderComponentToString(<everything />));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment