Last active
May 11, 2016 20:16
-
-
Save osmelmora/23742ab2856cd28ca338a6961a05ae22 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="example"></div> | |
<script type="text/javascript"> | |
var fragment = ['Item 1', 'Item 2'].map(function (title, i) { | |
return React.DOM.li({className: 'item', key: i}, title); | |
}); | |
var itemsList = React.createElement( | |
'ul', | |
{className: 'list'}, | |
fragment | |
); | |
ReactDOM.render( | |
itemsList, | |
document.getElementById('example') | |
); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment