Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export default class Login extends Component {
changeUsername (event) {
this.props.fieldChange('username', event.target.value);
}
changePassword (event) {
this.props.fieldChange('password', event.target.value);
}
render () {
return (
<form className={authStyles.form} onSubmit={this.props.onSubmit}>
<input type='text' name='username' placeholder='Username'value={this.props.username}
onChange={this.changeUsername}
/>
<input
type='password'
name='password'
placeholder='Password'
value={this.props.password}
onChange={this.changePassword}
/>
</form>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.