jfilter / react-native-onboarding-swiper

🛳 Delightful onboarding for your React-Native app
https://www.npmjs.com/package/react-native-onboarding-swiper
Other
971 stars 179 forks source link

Added onSlide function #104

Closed kickbk closed 2 years ago

kickbk commented 3 years ago

Adding the ability to listen to the FlatList onSwipePageChange event by adding the onSlide option to the component. It retrieves the current and previous page indexes. Example:

<Onboarding
    onSlide={({currentPage, previousPage}) => {
      ...
    }}
   ...
jfilter commented 2 years ago

Hey, thanks for proposing, but there is already an pageIndexCallback that returns the new page index on change. The current and the previous page can be derived from the page index change.