With the library
react-native-gesture-hander, we can use the native gesture recognition APIs.
We can use these React components to detect gestures:
A gesture is always in one of the following states:
onHandlerStateChange prop is called when the state changes.
Any change in the gesture (e.g. the user moving their finger) will trigger an event - we can listen for events with the
PanGestureHandler event metadata includes:
These can become
Want to learn React Native in-depth?