question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash when using Animated.event on onGestureEvent

See original GitHub issue

I 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: image

But if I make the function by myself like in my repo it works. So something weird is going on here 🤔

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
osdnkcommented, Jun 12, 2018

@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 of View.

0reactions
brunocrpontescommented, Oct 2, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found