Created
February 4, 2019 02:16
-
-
Save StevenJL/ac3d0530b0d819bfc798725c368723e7 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
class SomeForm extends React.Component { | |
handleFirstNameChange = (event) => { | |
this.setState({firstName: event.currentTarget.value}); | |
console.log(this.state.firstName) | |
} | |
render () { | |
return ( | |
<div> | |
<input onChange={this.handleFirstnameChange} value={this.state.firstName}/> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment