Last active
November 17, 2016 14:34
-
-
Save mathieuancelin/79bb9969f9d44b58182c25a4d37bf79c to your computer and use it in GitHub Desktop.
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
<html> | |
<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"> | |
(function() { | |
var h = React.createElement; | |
var Hello = React.createClass({ | |
render: function() { | |
return h('h1', null, 'Hello From React'); | |
} | |
}); | |
ReactDOM.render(h(Hello, null), document.getElementById('app')); | |
})(); | |
</script> | |
</body> | |
</html> |
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
<html> | |
<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 Hello extends Component { | |
render() { | |
return h('h1', null, 'Hello From React'); | |
} | |
} | |
ReactDOM.render(h(Hello, null), document.getElementById('app')); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
J'ai ajouté hello-jsx.html :)
https://gist.github.com/ybonnel/7e65da7b53ab645f1675a44cdcddc133