From eeda7216d8928285bae72e0efc61844c2069b8ec Mon Sep 17 00:00:00 2001 From: Hung Vu Date: Thu, 29 Oct 2020 14:56:28 +0700 Subject: [PATCH] Fix useNativeDrive warning there 's a PR about this issue but I can't use the patch from that PR to apply, So i created this PR. --- LightboxOverlay.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LightboxOverlay.js b/LightboxOverlay.js index 9e01f9a..fb96653 100644 --- a/LightboxOverlay.js +++ b/LightboxOverlay.js @@ -99,7 +99,7 @@ export default class LightboxOverlay extends Component { onPanResponderMove: Animated.event([ null, { dy: this.state.pan } - ]), + ], { useNativeDriver: false }), onPanResponderTerminationRequest: (evt, gestureState) => true, onPanResponderRelease: (evt, gestureState) => { if(Math.abs(gestureState.dy) > DRAG_DISMISS_THRESHOLD) { @@ -115,7 +115,7 @@ export default class LightboxOverlay extends Component { } else { Animated.spring( this.state.pan, - { toValue: 0, ...this.props.springConfig } + { toValue: 0, useNativeDriver: false, ...this.props.springConfig} ).start(() => { this.setState({ isPanning: false }); }); } }, @@ -144,7 +144,7 @@ export default class LightboxOverlay extends Component { Animated.spring( this.state.openVal, - { toValue: 1, ...this.props.springConfig } + { toValue: 1, useNativeDriver: false, ...this.props.springConfig } ).start(() => { this.setState({ isAnimating: false }); this.props.didOpen(); @@ -161,7 +161,7 @@ export default class LightboxOverlay extends Component { }); Animated.spring( this.state.openVal, - { toValue: 0, ...this.props.springConfig } + { toValue: 0, useNativeDriver: false, ...this.props.springConfig } ).start(() => { this.setState({ isAnimating: false,