title: Why doesn't checkbox work in React Native?
body: <pre class="lang-js prettyprint-override"><code>import CheckBox from '@react-native-community/checkbox';
  
  export default class All extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
        items: [],
        isSelected: true,
      };
    }
  
    checkBoxChanged() {
      alert('changed');
      this.setState({isSelected : !this.state.isSelected})
    }
  
    render() {
      const { items } = this.state;
  
      return (
          &lt;Content&gt;
            &lt;View&gt;
              {items.map((item) =&gt; (
                &lt;View&gt;
                  &lt;Text&gt;{item.name}&lt;/Text&gt;
                    &lt;CheckBox
                      value={this.state.isSelected}
                      onValueChange={() =&gt; this.checkBoxChanged()}
                    /&gt;
                &lt;/View&gt;
              ))}
            &lt;/View&gt;
          &lt;/Content&gt;
      );
    }
  }
  </code></pre>
  
  <p>This doesn't work.I mean nothing happens.
  When I check on, nothing changes and it doesn't reach to checkBoxChanged().</p>
  
  <p>I got stuck in this problem.
  I would appreciate it if you could help me :) </p>