Skip to content

Instantly share code, notes, and snippets.

@brendaMan
Created July 8, 2019 09:22
Show Gist options
  • Save brendaMan/c18bb75a47079081f07cd155720c7c55 to your computer and use it in GitHub Desktop.
Save brendaMan/c18bb75a47079081f07cd155720c7c55 to your computer and use it in GitHub Desktop.
Quest 010 - Homer-s-odyssey
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