Skip to content

Instantly share code, notes, and snippets.

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