title: React Native conditional state in onPress render any time without press component
body: <p>Why is this onPress activated at any time without pressing TouchableOpacity when I change any property of state if project_id is not null?</p>
  
  <pre><code>&lt;TouchableOpacity
    onPress={() =&gt; {
      if (this.state.feedback.project_id != null) {
        this.setModalVisible(true);
      } else {
        Alert.alert('Select a project please');
      }
    }}&gt;
    &lt;View&gt;
      &lt;Text&gt;SEND NOW&lt;/Text&gt;
    &lt;/View&gt;
  &lt;/TouchableOpacity&gt;
  </code></pre>
  
  <p>Example process:</p>
  
  <ol>
  <li>I press this touchable and project_id == 1 , modal will open.</li>
  <li>I close the modal</li>
  <li>I change feedback.name with a textinput</li>
  <li>Because project_id is still 1 modal will open</li>
  </ol>