diff --git a/index.js b/index.js index 5996ff71..b5001804 100644 --- a/index.js +++ b/index.js @@ -13,16 +13,15 @@ const { InteractionManager, } = ReactNative; -const ViewPagerAndroid = require('@react-native-community/viewpager'); const TimerMixin = require('react-timer-mixin'); -const ViewPager = require('@react-native-community/viewpager'); +import PagerView from 'react-native-pager-view'; const SceneComponent = require('./SceneComponent'); const DefaultTabBar = require('./DefaultTabBar'); const ScrollableTabBar = require('./ScrollableTabBar'); const AnimatedViewPagerAndroid = Platform.OS === 'android' ? - Animated.createAnimatedComponent(ViewPager) : + Animated.createAnimatedComponent(PagerView) : undefined; const ScrollableTabView = createReactClass({ diff --git a/package.json b/package.json index a6f1a2c2..73946d00 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/brentvatne/react-native-scrollable-tab-view#readme", "dependencies": { - "@react-native-community/viewpager": "3.3.0", + "react-native-pager-view": "^4.2.4", "create-react-class": "^15.6.2", "prop-types": "^15.6.0", "react-timer-mixin": "^0.13.3"