I am building a React Native app and I am trying to make it so that when a user can slide their finger from a place not on the pressable to the pressable without lifting their finger and when the finger is over the pressable an action happens. How can I do that?
Asked
Active
Viewed 43 times
1 Answers
0
You can use the onHoverIn
prop on the Pressable
see the React Native Pressable docs
<Pressable onHoverIn={() => console.log("entered me")}>
<Text>Enter me</Text>
</Pressable>
See here a Snack Expo preview

RubenSmn
- 4,091
- 2
- 5
- 24
-
it only works on web. on ios nothing is happening. – Itay Lador May 02 '23 at 21:38