n4kz / react-native-pages

Easy to use page view component
Other
376 stars 83 forks source link

Develop #43

Closed pratikgode closed 4 years ago

pratikgode commented 4 years ago

For pagination onLastPageReached callback has added. it works for both Horizontal and Vertical pages transition.

<Pages
      horizontal={false}
      ref={o => this.pages = o}
      onLastPageReached={() => {
          console.log("Last page reached!!")
      }}>
        <View style={{ flex: 1, backgroundColor: 'orange' }} />
        <View style={{ flex: 1, backgroundColor: 'white' }} />
        <View style={{ flex: 1, backgroundColor: 'green' }} />
</Pages>