react-native-pager-view is an actively maintained React Native library providing a performant, native-backed solution for implementing horizontal paging views, such as carousels or tab views. It leverages the AndroidX ViewPager2 on Android and a SwiftUI-based implementation on iOS (since v8.0.0), ensuring a smooth and idiomatic user experience. The current stable version is 8.0.1, with consistent releases addressing bug fixes and introducing new features. Maintained by Callstack, a prominent contributor to the React Native ecosystem, its key differentiators include reliance on native UI components for optimal performance, a consistent API across platforms, and the recent modernization of its iOS implementation to SwiftUI in v8, which subtly changes animation behavior for multi-page navigation. This library is ideal for scenarios requiring swipeable content sections within a React Native application.
npm install react-native-pager-viewVerified import paths — ran on the pinned version, not inferred.
A basic example demonstrating a `PagerView` with three simple, swipeable pages, showcasing fundamental usage and styling.
Review any custom animations or visual tests on iOS to ensure the new behavior aligns with expectations. Open an issue if unexpected visual regressions occur beyond the intended animation change.
Migrate your React Native project to the new architecture. Refer to the official React Native documentation for guidance on enabling TurboModules and Fabric.
Remove the `transitionStyle` prop from your `PagerView` components. Implement custom transition logic if specific animation styles are required, or rely on the default behavior.
Uninstall `@react-native-community/viewpager`, install `react-native-pager-view`, update all `import` statements from `@react-native-community/viewpager` to `react-native-pager-view`. For React Native < 0.60, manual linking might be required.
Migrate your React Native project to the new architecture as `react-native-pager-view` v7+ requires it. Alternatively, downgrade `react-native-pager-view` to a 6.x version if new architecture migration is not feasible.
Remove the `transitionStyle` prop from your `PagerView` component. This prop is no longer supported and will cause a TypeScript error and has no runtime effect.