My issue is quite basic.
It might be something stupid but i haven't found any solution online anything related to it in the documentation.
I try to use the onPageSelected prop, expecting a number.
onPageSelected={this.onPageSelected}
and the method is
onPageSelected(pageIndex){
console.log(pageIndex)
}
The output is a SyntheticEvent, and not a number.
See the example: https://github.com/react-native-community/react-native-viewpager/blob/master/example/ViewPagerAndroidExample.android.js#L115-L117
onPageSelected = e => {
// You can access it by e.nativeEvent.position
};
why not return index