Skip to content

Instantly share code, notes, and snippets.

@robinvdvleuten
Last active April 11, 2016 11:15
Show Gist options
  • Save robinvdvleuten/d640d5fa5a01c692f97c97bdc7fab7b7 to your computer and use it in GitHub Desktop.
Save robinvdvleuten/d640d5fa5a01c692f97c97bdc7fab7b7 to your computer and use it in GitHub Desktop.
<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>
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