Created
July 1, 2019 14:45
-
-
Save santiagocodes/d1a1f13f8b9e599067f908dd7230c390 to your computer and use it in GitHub Desktop.
Odyssey-d-Homer Quest 010
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 from 'react'; | |
class SignUp extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state= { | |
email: "" | |
}; | |
this.handleChange = this.handleChange.bind(this); | |
} | |
handleChange(event) { | |
this.setState({email: event.target.value}); | |
// console.log(event.target.value) | |
} | |
render() { | |
return( | |
<div> | |
<h1>Welcome {this.state.email}</h1> | |
<input | |
type="email" | |
name="email" | |
onChange={this.handleChange} | |
/> | |
</div> | |
); | |
} | |
} | |
export default SignUp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment