import React, { useMemo } from 'react'; import { StyleSheet, View, SafeAreaView, Text } from 'react-native'; import { LikeCount } from './component/LikeCount'; import { NavigationPanel } from './component/NavigationPanel'; import { usePagerView } from 'react-native-pager-view'; export function PagerHookExample() { const { AnimatedPagerView, ref, ...rest } = usePagerView({ pagesAmount: 10 }); return ( {useMemo( () => rest.pages.map((_, index) => ( {`page number ${index}`} )), [rest.pages] )} ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: 'white', }, image: { width: 300, height: 200, padding: 20, }, PagerView: { flex: 1, }, });