Crash when using Animated.event on onGestureEvent
See original GitHub issueI have made reproduction repo of the problem here: https://github.com/henrikra/gesture-handler-crash/blob/master/App.js
I am using PanGestureHandler
as my gesture handler. Then I want to add function for onGestureEvent
just like in the docs example: https://kmagiera.github.io/react-native-gesture-handler/docs/handler-pan.html#example
But if I do what the docs say and add Animated.event
and swipe my view it will crash with this error:
But if I make the function by myself like in my repo it works. So something weird is going on here 🤔
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Crash when using Animated.event on onGestureEvent #203
I did try to take o a look and this issue and you might consider as a very temporary workaround to use Animated.View...
Read more >PanGestureHandler | React Native Gesture Handler
A continuous gesture handler that can recognize a panning (dragging) gesture and track its movement.
Read more >The basics of PanGestureHandler with React Native ...
We will also play around with some animations thanks to Reanimated 2. To enhance the learning experience I based this tutorial on building...
Read more >onGestureEvent not being called when I try to move a box ...
I'm trying to test the pan event, but onGestureEvent doesn't seem to trigger ... I'm using it in another project and need to...
Read more >Pinch to Zoom Gesture
Value(1); onPinchEvent = Animated.event([{ nativeEvent: { scale: this.scale } }] ... <PinchGestureHandler onGestureEvent={this.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@henrikra I did try to take o a look and this issue and you might consider as a very temporary workaround to use
Animated.View
instead ofView
.I’m getting that error, but in my case it happens when I wrapper a commom
<View>
inside a<TapGestureHandler>
. However if i wrapper a<Animated.View>
inside a<TapGestureHandler>
the component works fine.