-
-
Save ybonnel/7e65da7b53ab645f1675a44cdcddc133 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> |
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://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.14.0/babel.min.js"></script> | |
<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/babel"> | |
{ | |
class Hello extends React.Component { | |
render() { | |
return <h1>Hello From React</h1> | |
} | |
} | |
ReactDOM.render(<Hello/>, document.getElementById('app')); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment