Created
December 18, 2018 19:51
-
-
Save louy/3fe9eb0f458e984c8ecc8a7c0c04ce06 to your computer and use it in GitHub Desktop.
React prototype boilerplate
This file contains 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
<!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