Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@amosuro
Created November 5, 2018 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amosuro/b00346814044f715babfa829aeb0a21c to your computer and use it in GitHub Desktop.
Save amosuro/b00346814044f715babfa829aeb0a21c to your computer and use it in GitHub Desktop.
render() {
const {name, email, message} = this.state.fields;
return (
<form ref={this.formElement}
onSubmit={() => this.submitForm()}>
<input type="text"
value={name}
onChange={event => this.onInputChange(event, 'name')}
name="name"
id="name" />
<input type="email"
value={email}
onChange={event => this.onInputChange(event, 'email')}
name="email"
id="email" />
<input type="textarea"
value={message}
onChange={event => this.onInputChange(event, 'textarea')}
name="message"
id="message" />
<button type="submit">Submit</button>
</form>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment