Closed eduardoschneider closed 1 year ago
The problem may be with which Animated
you're using. In the snack you're importing Animated
from react-native
, but in order for Reanimated to correctly handle the useAnimatedGestureHandler
output you need to import Animated
from react-native-reanimated
, like so:
import Animated, { useAnimatedGestureHandler } from 'react-native-reanimated'
The problem may be with which
Animated
you're using. In the snack you're importingAnimated
fromreact-native
, but in order for Reanimated to correctly handle theuseAnimatedGestureHandler
output you need to importAnimated
fromreact-native-reanimated
, like so:import Animated, { useAnimatedGestureHandler } from 'react-native-reanimated'
Oh............................................ that was it....... Thank you hahahah
Description
I'm having this issue which was previously reported and I've tried everything I could find, but nothing worked. In my case its Android, every example I've found were using iOS or Web. The "solution" was to add an Animated child to the PanGestureHandler, or wrap with GestureHandlerRootView, both solutions didnt work :(
I also tried adding
useAnimatedGestureHandler<PanGestureHandlerGestureEvent>
since its typescript, but it also didnt work.Error: Expected
onGestureHandlerEvent
listener to be a function, instead got a value ofobject
type.My package.json looks like this:
Any help would be appreciated.
Steps to reproduce
Snack or a link to a repository
https://snack.expo.dev/@eduschneiders/expected-to-be-a-function
Reanimated version
2.8.0
React Native version
0.68.2
Platforms
Android
JavaScript runtime
None
Workflow
Expo managed workflow
Architecture
None
Build type
Debug mode
Device
Real device
Device model
Amazon Fire 7
Acknowledgements
Yes