react-native-swiper
react-native-swiper copied to clipboard
Is there a prop where I can get the swipe progress?
Which OS ?
Android 9
Version
Which versions are you using:
- react-native-swiper v1.6.0?
- react-native v0.61.4
Expected behaviour
There should be a prop like onSwipe that gets the progress of the swipe action. I think of it like the onScroll prop of the ScrollView but with different event information.
Actual behaviour
There is no such onSwipe prop and no way to track the swipe progress (For example if I want to move another element simultaneously to the swipe progress). At the moment it is only possible to subscribe to the start/end of a swipe, but not to all steps in between.
It's not in the documentation, but you can simply attach an onScroll prop.
<Swiper onScroll={e => { console.log(e) }}>
You can then get the event data through e.nativeEvent