title: how to prevent onPress event in react native
body: <p>How can I prevent function for onPress from running when onLongPress is triggered. Current when I long press after releasing the button onPress is still triggered.</p>
  <pre><code>const _handleOnpress =()=&gt;{
    console.log('onPressed triggered')
    // other task only for onPress event
  }
  
  const _handleLongPress =()=&gt;{
    console.log('LongPress triggered')
    // other task only for onLongPress event
  }
  
  return(
    &lt;Pressable
      onPress={_handleOnpress}
      onLongPress={_handleLongPress}
    &gt;
      &lt;Text&gt;Press me&lt;/Text&gt;
    &lt;/Pressable&gt;
  )
  </code></pre>