Last active
April 11, 2016 11:15
-
-
Save robinvdvleuten/d640d5fa5a01c692f97c97bdc7fab7b7 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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>php-react-lamda-example</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script> | |
window.__INITIAL_PAYLOAD__ = { name: "World" }; | |
</script> | |
<script src="/bundle.js"></script> | |
<body> | |
</html> |
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 React from 'react'; | |
import { render } from 'react-dom'; | |
import Application from './app'; | |
const payload = window.__INITIAL_PAYLOAD__; | |
render(<Application name={payload.name} />, document.getElementById('root')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment