You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey i was reading through your react-native-docs that's where i noticed this line
On an element wrapped by Pressable:
onPressIn is called when a press is activated.
onPressOut is called when the press gesture is deactivated.
After pressing onPressIn, one of two things will happen:
The person will remove their finger, triggering onPressOut followed by onPress.
What is the problem?
The problem is that in my code when i implemented it in the expo
<Pressable style={styles.opa} onPressIn={()=>setState('Usser pressedIn')} onPressOut={()=>{setState("User pressed out")}}
onPress={()=>{setState("User clicked button");alert('ha ha')}} delayLongPress={2000} onLongPress={()=>setState("long press")}>
--Text-- I am a button --/Text--
--/Pressable--
The onPressOut was firing somehow later like the final state that i see is User pressed out but it should be User Clicked button now if i hold my button for 2 seconds then the order is correct the onPress is called after the onPressOut. onPress is being called but in wrong order if i click and lift my finger immediately
How can we address it?
Why is it important?
Who needs this?
When should this happen (use version numbers if needed)?
The text was updated successfully, but these errors were encountered:
Description
Hey i was reading through your react-native-docs that's where i noticed this line
On an element wrapped by Pressable:
After pressing onPressIn, one of two things will happen:
What is the problem?
The problem is that in my code when i implemented it in the expo
<Pressable style={styles.opa} onPressIn={()=>setState('Usser pressedIn')} onPressOut={()=>{setState("User pressed out")}}
onPress={()=>{setState("User clicked button");alert('ha ha')}} delayLongPress={2000} onLongPress={()=>setState("long press")}>
--Text-- I am a button --/Text--
--/Pressable--
The onPressOut was firing somehow later like the final state that i see is User pressed out but it should be User Clicked button now if i hold my button for 2 seconds then the order is correct the onPress is called after the onPressOut. onPress is being called but in wrong order if i click and lift my finger immediately
How can we address it?
Why is it important?
Who needs this?
When should this happen (use version numbers if needed)?
The text was updated successfully, but these errors were encountered: