Created
November 5, 2018 12:34
-
-
Save amosuro/b00346814044f715babfa829aeb0a21c 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
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