Created
May 22, 2018 08:03
-
-
Save florentinH/cb3e4a75257e332cae1426981d10b47d to your computer and use it in GitHub Desktop.
This file contains 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
import React from 'react' | |
class SignUp extends React.Component { | |
constructor(props){ | |
super(props) | |
this.updateEmailField = this.updateEmailField.bind(this) | |
this.state = { email: ''} | |
} | |
updateEmailField(event) { | |
this.setState({ email: event.target.value}) | |
} | |
render() { | |
return ( | |
<div> | |
<h1>{this.state.email}</h1> | |
<input type="email" name="email" value={this.state.email} onChange={this.updateEmailField}/> | |
</div> | |
) | |
} | |
} | |
export default SignUp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment