diff --git a/index.js b/index.js index 07d09f1..651a7aa 100755 --- a/index.js +++ b/index.js @@ -103,6 +103,14 @@ export default class CheckBox extends Component { ); } + componentWillReceiveProps( newProps ){ + if (newProps.isChecked != this.state.isChecked){ + this.setState({ + isChecked: !this.state.isChecked + }) + } + } + render() { return (