Skip to content

Instantly share code, notes, and snippets.

@louy
Created December 18, 2018 19:51
Show Gist options
  • Save louy/3fe9eb0f458e984c8ecc8a7c0c04ce06 to your computer and use it in GitHub Desktop.
Save louy/3fe9eb0f458e984c8ecc8a7c0c04ce06 to your computer and use it in GitHub Desktop.
React prototype boilerplate
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Prototype</title>
</head>
<body>
<div id="root"></div>
<script src="https://unpkg.com/react@16.7.0-alpha.2/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@16.7.0-alpha.2/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/htm@1.0.1/dist/htm.js"></script>
<script>
const html = htm.bind(React.createElement);
const App = () => html`
<h1>Hello world!</h1>
`;
ReactDOM.render(html`<${App} />`, document.getElementById('root'))
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment