diff --git a/components/checkbox/readme.md b/components/checkbox/readme.md index 371247ff..9c7d409c 100644 --- a/components/checkbox/readme.md +++ b/components/checkbox/readme.md @@ -7,36 +7,33 @@ import Checkbox from 'react-toolbox/lib/checkbox'; class TestCheckbox extends React.Component { - state = { - check1: true, - check2: false - }; + state = { check1: true, check2: false }; handleChange = (field, value) => { - this.setState({ [field]: value }); + this.setState({...this.state, [field]: value}); }; render () { return (
- - -
); - } + } } ```