From c8246f5c3b5bf5e637b99de8f75f667458b0daea Mon Sep 17 00:00:00 2001 From: Javi Velasco Date: Thu, 3 Dec 2015 01:00:59 +0100 Subject: [PATCH] Fix checkbox readme --- components/checkbox/readme.md | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) 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 (
- - -
); - } + } } ```