Remove unnecessary spread

`setState` does a shallow merge, so there is no need to spread the existing state here
old
Charlie Martin 2016-08-15 02:05:48 -04:00 committed by GitHub
parent 157da1dc9d
commit 9312522bac
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ class TestCheckbox extends React.Component {
};
handleChange = (field, value) => {
this.setState({...this.state, [field]: value});
this.setState({[field]: value});
};
render () {