Created
October 31, 2018 17:44
-
-
Save rocksinghajay/8d0d7155f312aa7a443817306b5a0079 to your computer and use it in GitHub Desktop.
This file contains 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' | |
export default class Login extends Component { | |
state = { | |
email: '', | |
password: '' | |
}; | |
handleOnChange = event => { | |
this.setState({ | |
[event.target.name]: event.target.value | |
}) | |
} | |
render() { | |
return ( | |
<form> | |
<label>Email</label> | |
<input type="text" name="email" onChange={this.handleOnChange} /> | |
<label>Password</label> | |
<input type="password" name="password" onChange={this.handleOnChange} /> | |
</form> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment