Skip to content

Instantly share code, notes, and snippets.

@chunghe
Created October 31, 2014 07:24
Show Gist options
  • Save chunghe/2dd99d9cf77dd0865e72 to your computer and use it in GitHub Desktop.
Save chunghe/2dd99d9cf77dd0865e72 to your computer and use it in GitHub Desktop.
/** @jsx React.DOM */
var React = require("react");
class HelloWorld {
getInitialState() {
return {
name: null
};
}
onNameInput(e) {
this.setState({name: e.target.value});
}
render() {
return (
<h1>hello world</h1>
);
}
}
module.exports = React.createClass(HelloWorld.prototype);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment