Skip to content

Instantly share code, notes, and snippets.

@agoiabel
Last active January 26, 2019 04:33
Show Gist options
  • Save agoiabel/34bb1d4be4c4a507ebff7a3f2151842b to your computer and use it in GitHub Desktop.
Save agoiabel/34bb1d4be4c4a507ebff7a3f2151842b to your computer and use it in GitHub Desktop.
submitFormHandler = event => {
event.preventDefault();
console.dir(this.refs.name.value); //will give us the name value
}
render() {
return (
<div>
<form onSubmit={this.submitFormHandler}>
<div>
<input type="text" name="name" ref="name" />
</div>
</form>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment