colorfy-software / react-native-modalfy

🥞 Modal citizen of React Native.
https://colorfy-software.gitbook.io/react-native-modalfy
MIT License
1.06k stars 41 forks source link

Sending `onAnimatedValueUpdate` with no listeners registered. #124

Closed emilnili closed 4 months ago

emilnili commented 9 months ago

Seems we get these errors now with modals when updated to new react native.

"react-native": "0.72.4", "react-native-gesture-handler": "~2.12.0",

The error occurs when the modal is closed, and it seems the animation does not work properly either. The options for the modal that causes this error looks like this:

transitionOptions: (animatedValue) => ({ opacity: animatedValue.interpolate({ inputRange: [0, 1, 2], outputRange: [0, 1, 0.9], }), transform: [ { translateX: animatedValue.interpolate({ inputRange: [0, 1, 2], outputRange: [-width / 2, 0, 25], }), }, { rotate: animatedValue.interpolate({ inputRange: [0, 1, 2], outputRange: ["-19deg", "0deg", "19deg"], }), }, { scale: animatedValue.interpolate({ inputRange: [0, 1, 2], outputRange: [0.8, 1, 0.8], }), }, ], }), animateInConfig: { easing: Easing.bezier(0.42, -0.03, 0.27, 0.95), duration: 400, }, animateOutConfig: { easing: Easing.bezier(0.42, -0.03, 0.27, 0.95), duration: 300, }, };

Removing this transitionOptions will cause the error to disappear. But the modal will not have any nice animation...

ermamud commented 8 months ago

I am seeing similar issue while using the exact same code they have in the example folder

CharlesMangwa commented 8 months ago

hey @emilnili! could you provide a repro on snack please? that would make it easier for debugging

ermamud commented 8 months ago

you can use the same snack i shared with you in the other issue, i can see the warnings here:

https://snack.expo.dev/@ermamud/modalfy_error_test

WadhahEssam commented 7 months ago

this is happening with me, using the same config in the docs

stalteri commented 6 months ago

same issue on closeModal "react-native": "0.73.0", "react-native-gesture-handler": "2.14.0", "react-native-modalfy": "3.5.2"

image

hlspablo commented 4 months ago

Same here. Context: RN 0.73, Expo 50, React Router v3