MCPcopy Index your code
hub / github.com/callstack/react-native-pager-view / constructor

Method constructor

example/src/PaperExample.tsx:28–48  ·  view source on GitHub ↗
(props: any)

Source from the content-addressed store, hash-verified

26 viewPager = React.createRef<PagerView>();
27
28 constructor(props: any) {
29 super(props);
30
31 const pages = [];
32 for (let i = 0; i < PAGES; i++) {
33 pages.push(createPage(i));
34 }
35
36 this.state = {
37 page: 0,
38 animationsAreEnabled: true,
39 scrollEnabled: true,
40 progress: {
41 position: 0,
42 offset: 0,
43 },
44 pages: pages,
45 scrollState: 'idle',
46 dotsVisible: false,
47 };
48 }
49
50 onPageSelected = (e: any) => {
51 this.setState({ page: e.nativeEvent.position });

Callers

nothing calls this directly

Calls 1

createPageFunction · 0.90

Tested by

no test coverage detected