Created
July 8, 2019 09:11
-
-
Save evadav/6e98cb65324de920dfc8717c9b20033c 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
import React, {Component} from 'react'; | |
export default class SignUp extends Component { | |
constructor(props){ | |
super(props); | |
this.state = { | |
email: "" | |
}; | |
this.updateEmailField = this.updateEmailField.bind(this); | |
} | |
updateEmailField(e) { | |
/*const{value, email} = e.target;*/ | |
this.setState({ | |
value: e.target.value | |
}) | |
} | |
render() { | |
return( | |
<div> | |
<h1> | |
{this.state.value} | |
</h1> | |
<input | |
type='email' | |
name = 'email' | |
onChange = {this.updateEmailField} | |
/> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment