Skip to content

Instantly share code, notes, and snippets.

@eliperelman eliperelman/foo.jsx forked from lightsofapollo/foo.jsx
Last active Mar 1, 2018

Embed
What would you like to do?
class Foo extends Component {
state = {
email: '',
password: '',
};
handleChange = e => {
this.setState({
[e.target.name]: e.target.value,
});
};
render() {
return (
<input name="email" value={this.state.email} onChange={handleChange} />
<input name="password" value={this.state.password} onChange={handleChange} />
);
}
}
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.