title: Handling state with multiple checkboxes in React Native
body: <p>I have a simple form with two checkboxes for someone to choose one or the other i.e <code>Yes</code> or <code>No</code> not both. Am using the <code>React-native-element</code> toolkit as shown below.</p>
  
  <pre><code>export default class CheckerForm extends React.Component {
       state = {
         checked: false,
        }
      handleYesCheck =() =&gt; {
         this.setState({checked: !this.state.checked})
      }
  
      handleNoCheck =() =&gt; {
        this.setState({checked: !this.state.checked})
      }
  
      render(){
  
     const { checked } = this.state
       return (
        &lt;View&gt;
         &lt;CheckBox
         center
          title='Yes'
          checked={checked}
          onPress={this.handleYesCheck}
       /&gt;
       &lt;CheckBox
        center
        title='No'
        checked={checked}
        onPress={this.handleNoCheck}
      /&gt;
     &lt;View&gt;
  </code></pre>
  
  <p>I want to capture and modify the state of the checkboxes but when I click one of the checkboxes I modify the state of the other i.e both will be checked and unchecked. How can I modify the states of the checkboxes independently such that when I click on <code>Yes</code>, <code>No</code> is unchecked and vice versa? Generally what is the best way to capture the state so that I can use it.</p>