Last active
May 19, 2016 14:48
-
-
Save osmelmora/8993bf8949125fa3d9aa93703fb3a54e 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Hello React</title> | |
<script src="https://fb.me/react-15.0.2.js"></script> | |
<script src="https://fb.me/react-dom-15.0.2.js"></script> | |
</head> | |
<body> | |
<div id="app-container"></div> | |
<script type="text/javascript"> | |
var Component = React.createClass({ | |
render: function() { | |
return React.DOM.h1({className: 'header'}, this.props.title); | |
} | |
}); | |
ReactDOM.render( | |
React.createElement(Component, {title: "I'm a custom component"}), | |
document.getElementById('app-container') | |
); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment