title: Show alert if CheckBox isn't pressed before signing up in React Native
body: <p>I want to oblige the user to press the CheckBox button before signing up, otherwise show alert saying &quot;you should agree with our terms and policies&quot;. Here's my code that makes sure all the fields are not empty, i want to check if the checkbox is pressed too:</p>
  <pre><code>onSignUp(){
      if(
          this.state.email != '' &amp;&amp;
          this.state.password != '' &amp;&amp;
          this.state.name != '' 
        ){
          const { email, password, name } = this.state;
          firebase.auth().createUserWithEmailAndPassword(email, password)
          .then((result) =&gt; {
              firebase.firestore().collection(&quot;Users&quot;)
                  .doc(firebase.auth().currentUser.uid)
                  .set({
                      name,
                      email
                  })
              console.log(result)
          })
          .catch((error) =&gt; {
              console.log(error)
          })
      }
  else{
      alert(&quot;Make sure you filled all the fields with correct info!&quot;);
  }
  
  
  
  
  
  }
  </code></pre>
  <p>CheckBox button</p>
  <pre><code>&lt;Checkbox style={{padding:'5%'}}  color=&quot;primary&quot; label=&quot;I agree with Terms &amp; Policies&quot; /&gt;
  </code></pre>