Created
December 25, 2014 09:14
-
-
Save jackcallister/36e65f3fa5172c7a2cae to your computer and use it in GitHub Desktop.
React JS quick start guide // source http://jsbin.com/rohin
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://fb.me/react-with-addons-0.12.0.js"></script> | |
<meta charset="utf-8"> | |
<title>React JS quick start guide</title> | |
<style id="jsbin-css"> | |
body { | |
margin: 0; | |
background: #E8E8E8; | |
} | |
img { | |
width: 200px; | |
display: block; | |
margin: 1em auto; | |
} | |
</style> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var Photo = React.createClass({displayName: 'Photo', | |
render: function() { | |
return React.createElement("img", {src: "http://tinyurl.com/lkevsb9"}) | |
} | |
}); | |
React.render(React.createElement(Photo, null), document.body); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//fb.me/react-with-addons-0.12.0.js"><\/script> | |
<meta charset="utf-8"> | |
<title>React JS quick start guide</title> | |
</head> | |
<body> | |
</body> | |
</html></script> | |
<script id="jsbin-source-css" type="text/css">body { | |
margin: 0; | |
background: #E8E8E8; | |
} | |
img { | |
width: 200px; | |
display: block; | |
margin: 1em auto; | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var Photo = React.createClass({ | |
render: function() { | |
return <img src='http://tinyurl.com/lkevsb9' /> | |
} | |
}); | |
React.render(<Photo />, document.body); | |
</script></body> | |
</html> |
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
body { | |
margin: 0; | |
background: #E8E8E8; | |
} | |
img { | |
width: 200px; | |
display: block; | |
margin: 1em auto; | |
} |
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
var Photo = React.createClass({displayName: 'Photo', | |
render: function() { | |
return React.createElement("img", {src: "http://tinyurl.com/lkevsb9"}) | |
} | |
}); | |
React.render(React.createElement(Photo, null), document.body); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment