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