Skip to content

Instantly share code, notes, and snippets.

@mathieuancelin
Created October 24, 2016 12:19
Show Gist options
  • Select an option

  • Save mathieuancelin/b671233da7c8ba6015bd3283cb504934 to your computer and use it in GitHub Desktop.

Select an option

Save mathieuancelin/b671233da7c8ba6015bd3283cb504934 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Hello World with React</title>
</head>
<body>
<div id="app"></div>
<script src="https://unpkg.com/react/dist/react.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/react-dom/dist/react-dom.min.js" type="text/javascript"></script>
<script type="text/javascript">
{
const { createElement: h, Component } = React;
class HelloWorld extends Component {
render() {
return (
h('h1', null, 'Hello World with React!')
);
}
}
ReactDOM.render(h(HelloWorld), document.getElementById('app'));
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment