Skip to content

Commit 7df8dfa

Browse files
author
Darrell Rivera
committed
Fix ViewPagerAndroid error
1 parent a386010 commit 7df8dfa

File tree

3 files changed

+967
-4
lines changed

3 files changed

+967
-4
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ const {
1010
ScrollView,
1111
Platform,
1212
StyleSheet,
13-
ViewPagerAndroid,
1413
InteractionManager,
1514
} = ReactNative;
15+
const ViewPagerAndroid = require('@react-native-community/viewpager');
1616
const TimerMixin = require('react-timer-mixin');
1717

1818
const SceneComponent = require('./SceneComponent');
@@ -332,7 +332,7 @@ const ScrollableTabView = createReactClass({
332332
if (!width || width <= 0 || Math.round(width) === Math.round(this.state.containerWidth)) {
333333
return;
334334
}
335-
335+
336336
if (Platform.OS === 'ios') {
337337
const containerWidthAnimatedValue = new Animated.Value(width);
338338
// Need to call __makeNative manually to avoid a native animated bug. See

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
},
3030
"homepage": "https://github.com/brentvatne/react-native-scrollable-tab-view#readme",
3131
"dependencies": {
32-
"react-timer-mixin": "^0.13.3",
32+
"@react-native-community/viewpager": "^1.1.7",
33+
"create-react-class": "^15.6.2",
3334
"prop-types": "^15.6.0",
34-
"create-react-class": "^15.6.2"
35+
"react-timer-mixin": "^0.13.3"
3536
},
3637
"devDependencies": {
3738
"babel-eslint": "^6.1.2",

0 commit comments

Comments
 (0)