Skip to content

Instantly share code, notes, and snippets.

@evadav
Created July 8, 2019 09:11
Show Gist options
  • Save evadav/6e98cb65324de920dfc8717c9b20033c to your computer and use it in GitHub Desktop.
Save evadav/6e98cb65324de920dfc8717c9b20033c to your computer and use it in GitHub Desktop.
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