Created
April 20, 2014 17:05
-
-
Save revathskumar/11119268 to your computer and use it in GitHub Desktop.
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> | |
<meta name="description" content="Try on React.js" /> | |
<script src="//fb.me/react-0.9.0.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="hello"></div> | |
</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
/** @jsx React.DOM */ | |
var HelloMessage = React.createClass({ | |
click: function(){ | |
console.log('clicked'); | |
}, | |
render: function(){ | |
return <div onClick={this.click}>Hello {this.props.name} </div>; | |
} | |
}); | |
React.renderComponent(<HelloMessage name="Revath" />, document.getElementById('hello')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment