title: How to cancel onPress in React Native
body: <p>I have a TouchableHighlight zone in my component.</p>
  
  <p>I would like to trigger <code>_onPress</code> method for a quick tap, and <code>_onLongPress</code> for a longer tap.
  This works, but <code>_onPress</code> method is always triggered when I release the tap.</p>
  
  <p>How can I do to trigger only one of these methods depending on short tap or long tap ?</p>
  
  <pre><code>class MyClass extends React.Component {
      _onPress = () =&gt; {
          console.log("Press")
      }
  
      _onLongPress = () =&gt; {
          console.log("LongPress")
      }
  
      render() {
          return (
              &lt;TouchableHighlight
                  style={styles.touchable}
                  underlayColor="white"
                  delayPressIn={2000}
                  onPress={this._onPress}
                  onPressIn={this._onLongPress}
              &gt;
                  &lt;View style={styles.box}&gt;
                      &lt;Image style={styles.logo} source={this.state.logo.id} /&gt;
                  &lt;/View&gt;
              &lt;/TouchableHighlight&gt;
          )
      }
  }
  </code></pre>
  
  <p>Many thanks  :)</p>