Skip to content

Instantly share code, notes, and snippets.

@devhyunjae
Created March 18, 2016 02:30
Show Gist options
  • Select an option

  • Save devhyunjae/73be400450085fa0878a to your computer and use it in GitHub Desktop.

Select an option

Save devhyunjae/73be400450085fa0878a to your computer and use it in GitHub Desktop.
var AppES5 = React.createClass({
getInitialState: function(){
return {foo: 1};
},
handleChange: function(e) {
this.setState({
foo: e.target.value
});
},
render: function(){
return(
<div>
<input type="text" onChange={this.handleChange}/>
{this.state.foo}
</div>
);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment