From 622a9fbb9c877f8704b5a8d7fa9e884f80e047d5 Mon Sep 17 00:00:00 2001 From: Rahul Das Date: Mon, 8 Nov 2021 21:46:17 +0530 Subject: [PATCH] [FIXED] onPanResponderMove is not a funciton issue and added the second necessary argument {useNativeDriver:true} option on Animated.event function --- LightboxOverlay.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/LightboxOverlay.js b/LightboxOverlay.js index 9e01f9a..5373c15 100644 --- a/LightboxOverlay.js +++ b/LightboxOverlay.js @@ -96,10 +96,11 @@ export default class LightboxOverlay extends Component { this.state.pan.setValue(0); this.setState({ isPanning: true }); }, - onPanResponderMove: Animated.event([ + onPanResponderMove:()=> Animated.event([ null, { dy: this.state.pan } - ]), + + ],{useNativeDriver:true}), onPanResponderTerminationRequest: (evt, gestureState) => true, onPanResponderRelease: (evt, gestureState) => { if(Math.abs(gestureState.dy) > DRAG_DISMISS_THRESHOLD) { @@ -249,4 +250,4 @@ export default class LightboxOverlay extends Component { ); } -} +} \ No newline at end of file