[Deprecated] ViewPager component for React Native
[Deprecated] ViewPager component for React Native
@Deprecated This repo is no more maintenance.
This is the ViewPager componnent in React Native both for Android and iOS.
This is a JavaScript-only implementation of pager for React Native. Like ListView,
this can render hundreds of pages without performance issue. Better than the one in
Android, this ViewPager can auto play -- turn page automaticly, loop -- make infinite scrolling.
Demo project is here.
npm install react-native-viewpager --savevar ViewPager = require('react-native-viewpager');
<ViewPager
dataSource={this.state.dataSource}
renderPage={this._renderPage}/>dataSource: this is require to provide pages data,renderPage: this is require to render page view,autoPlay: true to turn page automatically,initialPage: to set the index of the first page to load,isLoop: true to run in infinite scroll mode,locked: true to disable touch scroll,onChangePage: page change callback,renderPageIndicator: render custom ViewPager indicator.initialPage: show initially some other page than first page.animation: function that returns a React Native Animated configuration.Example:
…MIT License
No open issues yet, or sync has not completed.