我的技术栈:"react": "16.4.1", "react-native": "0.56.0" 使用你的react-native-check-box插件,版本2.1.0,2.0.2,checkbox点击都没有反应。用了版本1.0.4,import CheckBox from 'react-native-check-box' 就会导致程序报错。
Activity
juviaW commentedon Jan 10, 2019
@aioros2016 2.1.7. Checkbox clicks also don't respond.I've modified some of the code and it works.
constructor add
this.state = {
isChecked: this.props.isChecked
};
onClick() add
this.setState({
isChecked: !this.state.isChecked
});
_renderImage() change 'this.props.isChecked' to 'this.state.isChecked'