Created
July 8, 2019 09:22
-
-
Save brendaMan/c18bb75a47079081f07cd155720c7c55 to your computer and use it in GitHub Desktop.
Quest 010 - Homer-s-odyssey
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'; | |
class SignUp extends Component { | |
constructor(props){ | |
super(props); | |
this.state = { | |
mail: "" | |
}; | |
this.handleChange = this.handleChange.bind(this); | |
}; | |
handleChange(event) { | |
this.setState({mail: event.target.value}); | |
} | |
render() { | |
return ( | |
<div className="box"> | |
<h1>This is : {this.state.mail}</h1> | |
<input | |
type="text" | |
name="mail" | |
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