I was trying to move all things that I could to useNativeDriver
. I tried this:
onPanResponderMove: Animated.event([null, { dy:this.state.appearAnim }], { useNativeDriver:true }),
However this causes the error of:
config.onPanResponderMove is not a function
If I just set useNativeDriver
to false
, it works as per expectations.
Does anyone have any idea on how to use native driver with PanResponder?
I quote from the react-native github repository:
This is a current limitation of native Animated.event. It doesn't work with PanResponder because it is implemented in JavaScript. You can have a look at https://github.com/wix/react-native-interactable which can handle gestures with native animated values.
Looks like it is currently not possible to useNativeDriver with the PanResponder in react native.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With