fixt / react-native-page-swiper

91 stars 47 forks source link

getting current slide index inside onPageChange function #20

Open sir-gon opened 7 years ago

sir-gon commented 7 years ago

How can I get current slide index from inside onPageChange function?

I'm building a "Tutorial Page" for my application, and I want to show/hide another elements in the first and last pages.

michaelkitson commented 7 years ago

In case anyone else stumbles across this issue wondering the same thing, onPageChange is called with the page number as the sole argument, as shown here.