Created
January 31, 2015 01:11
-
-
Save insin/3d28a42c121373950972 to your computer and use it in GitHub Desktop.
React Hello World - http://bl.ocks.org/insin/raw/3d28a42c121373950972/
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
<script src="http://fb.me/react-with-addons-0.12.2.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.12.2.js"></script> | |
<script type="text/jsx;harmony=true">void function() { 'use strict'; | |
var App = React.createClass({ | |
render() { | |
return <div> | |
<Hello who="World"/> | |
<Hello who="Reddit"/> | |
</div> | |
} | |
}) | |
var Hello = React.createClass({ | |
render() { | |
return <h1>Hello {this.props.who}!</h1> | |
} | |
}) | |
React.render(<App/>, document.body) | |
}()</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment