Skip to content

Instantly share code, notes, and snippets.

@santiagocodes
Created July 1, 2019 14:45
Show Gist options
  • Save santiagocodes/d1a1f13f8b9e599067f908dd7230c390 to your computer and use it in GitHub Desktop.
Save santiagocodes/d1a1f13f8b9e599067f908dd7230c390 to your computer and use it in GitHub Desktop.
Odyssey-d-Homer Quest 010
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