oblador / react-native-lightbox

Images etc in Full Screen Lightbox Popovers for React Native
MIT License
2.82k stars 502 forks source link

Animated.event now requires a second argument for options at LightboxOverlay #153

Open CarmineRumma opened 2 years ago

CarmineRumma commented 2 years ago

Hi! 👋

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-lightbox/LightboxOverlay.js b/node_modules/react-native-lightbox/LightboxOverlay.js
index 9e01f9a..a84fd9d 100644
--- a/node_modules/react-native-lightbox/LightboxOverlay.js
+++ b/node_modules/react-native-lightbox/LightboxOverlay.js
@@ -99,7 +99,8 @@ 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) {
rumfiske commented 1 year ago

Same error here. Hope it wil lget fixed soon

dmackinn commented 10 months ago

This package hasn't been updated since Dec 15, 2019 so it's doubtful the maintainer will do anything. I created a patch using the same fix as Carmine and was going to submit a PR but I noticed that this Github issue already existed. If you use the patch-package package you can retain the change between npm installs.