Skip to content

Commit

Permalink
added useNativeDriver:false to Animated.decay of DeckSwiper
Browse files Browse the repository at this point in the history
  • Loading branch information
copleykj committed Oct 19, 2020
1 parent 0315c11 commit c1e4a42
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/basic/DeckSwiper.js
Expand Up @@ -150,7 +150,8 @@ class DeckSwiper extends Component {

Animated.decay(this.state.pan, {
velocity: { x: velocity, y: vy },
deceleration: 0.98
deceleration: 0.98,
useNativeDriver: false
}).start(this._resetState.bind(this));
} else {
Animated.spring(this.state.pan, {
Expand Down Expand Up @@ -182,7 +183,8 @@ class DeckSwiper extends Component {
this.selectNext();
Animated.decay(this.state.pan, {
velocity: { x: 8, y: 1 },
deceleration: 0.98
deceleration: 0.98,
useNativeDriver: false
}).start(this._resetState.bind(this));
}, 300);
}
Expand All @@ -195,7 +197,8 @@ class DeckSwiper extends Component {
this.selectNext();
Animated.decay(this.state.pan, {
velocity: { x: -8, y: 1 },
deceleration: 0.98
deceleration: 0.98,
userNativeDriver: false
}).start(this._resetState.bind(this));
}, 300);
}
Expand Down

0 comments on commit c1e4a42

Please sign in to comment.