Skip to content

Instantly share code, notes, and snippets.

@StevenJL
Created February 4, 2019 02:16
Show Gist options
  • Save StevenJL/ac3d0530b0d819bfc798725c368723e7 to your computer and use it in GitHub Desktop.
Save StevenJL/ac3d0530b0d819bfc798725c368723e7 to your computer and use it in GitHub Desktop.
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