Created
January 7, 2016 18:34
-
-
Save puppybits/f76c1408a74d79440c12 to your computer and use it in GitHub Desktop.
A React Hello World without JSX, ES6, transpiling, tooling or anything getting in the way
This file contains hidden or 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="//fb.me/react-0.14.3.js"></script> | |
<script src="//fb.me/react-dom-0.14.3.js"></script> | |
<script> | |
var el = React.createElement; | |
var myView = React.createClass({ | |
render: function(){ | |
return el('h1', {color:'#F00'}, "Hello React"); | |
} | |
}); | |
ReactDOM.render(el(myView), document.getElementById('app')); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment