Skip to content

Instantly share code, notes, and snippets.

@revathskumar
Created April 20, 2014 17:05
Show Gist options
  • Save revathskumar/11119268 to your computer and use it in GitHub Desktop.
Save revathskumar/11119268 to your computer and use it in GitHub Desktop.
<!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>
/** @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