Created
March 18, 2016 02:31
-
-
Save devhyunjae/58f20cb00e8d35e63404 to your computer and use it in GitHub Desktop.
This file contains 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
class AppES6 extends React.Component{ | |
constructor(){ | |
super(); | |
this.state = {foo: 1}; | |
this.handleChange = this.handleChange.bind(this); | |
} | |
handleChange(e) { | |
this.setState({foo: e.target.value}); | |
} | |
render() { | |
return( | |
<input type="text" onChange={this.handleChange}/> | |
{this.state.foo} | |
); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment