Last active
May 11, 2016 20:16
-
-
Save osmelmora/71e7ac077f2bbe590311998e237ca068 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 liElement1 = React.DOM.li({className: 'item', key: 1}, 'Item 1'); | |
var liElement2 = React.DOM.li({className: 'item', key: 2}, 'Item 2'); | |
var fragment = [liElement1, liElement2]; | |
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