From c80caf0f97eeb5cccb8363d3dfe0a6d62bbcfef9 Mon Sep 17 00:00:00 2001 From: Aaron Lu Date: Wed, 10 Jun 2020 16:15:47 +0800 Subject: [PATCH] Fixed useNativeDriver warning --- LightboxOverlay.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LightboxOverlay.js b/LightboxOverlay.js index 9e01f9a..d093b44 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,