Skip to content

Commit

Permalink
add useNativeDriver attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Marina Sheenkova committed Jun 9, 2020
1 parent a1cb025 commit 7b0b635
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ export default class Swipeable extends PureComponent {
swipeReleaseAnimationConfig: {
toValue: {x: 0, y: 0},
duration: 250,
easing: Easing.elastic(0.5)
easing: Easing.elastic(0.5),
useNativeDriver: false
},

// misc
Expand Down Expand Up @@ -204,7 +205,7 @@ export default class Swipeable extends PureComponent {
_handlePan = Animated.event([null, {
dx: this.state.pan.x,
dy: this.state.pan.y
}]);
}], {useNativeDriver: false});

_handleMoveShouldSetPanResponder = (event, gestureState) => (
Math.abs(gestureState.dx) > this.props.swipeStartMinDistance
Expand Down

0 comments on commit 7b0b635

Please sign in to comment.