-
-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot destructure property 'onGestureHandlerStateChange' of 'this.ref.props' as it is undefined. #1164
Comments
Hi, I had investigated this issue for one of our projects and thought I would post my findings. I don't think we will be able to commit time to posting a PR, but I've at least diagnosed the problem. This may be of help to others and the maintainers. We recently updated a project from React Native Web from 0.12 to 0.13, and then needed to downgrade. In the release notes, it seems that RNW has changed which props it is forwarding through its refs to the DOM. It seems that there are a few places in the As a temporary workaround, downgrading to 0.12 stops the crash for the time being, with the caveat that you're missing compatibility with changes from later RN versions (ex: no |
I had the same problem. Downgrading react-native-web to 0.12.3 solved my problem. |
I was able to work the issue by making sure the children of GestureHandler components is a class that renders a View Something like this works: class NonForwardedRefAnimatedViewHack extends React.Component<any> {
render() {
return <Animated.View {...this.props} />;
}
}
...
<TapGestureHandler>
<NonForwardedRefAnimatedViewHack />
</TapGestureHandler> |
Same issue i got |
same here i'm using expo sdk version 39.0.2, |
@janicduplessis You legend. That avoids me having to downgrade. |
@AlastairTaft / @janicduplessis |
I'm facing this problem right now, any solution please? |
I have the same problem. "react": "^17.0.1", |
Cannot read property 'onGestureHandlerStateChange' of undefined need help please |
@keziabaidoo , the bug has been fixed yesterday use: "react-native-gesture-handler": "github:software-mansion/react-native-gesture-handler#196782c740cde1464e4ce4f5f46bf2c756ecdc43", It work for me. |
did not work |
same problem. |
Latest master did not fix the problem for me, but downgrading to 12.3 did. |
There is a new version out there with a fix for it according to the changelog. https://github.com/software-mansion/react-native-gesture-handler/releases/tag/1.9.0 |
Thank u
…On Thu, 26 Nov 2020, 11:34 am Elias Chaaya, ***@***.***> wrote:
There is a new version out there with a fix for it according to the
changelog.
https://github.com/software-mansion/react-native-gesture-handler/releases/tag/1.9.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1164 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANPZDOLCOWLNLDHJMRRHKILSRY4K3ANCNFSM4P26UJDQ>
.
|
## Description For some time we were unable to use `react-native-web` above version `0.12.3`. Along with gesture handler `1.9.0`, this has been fixed as stated [here](software-mansion/react-native-gesture-handler#1164 (comment)). It's required to pass a function on the web. Fixes #1406 ## Changes In Hooks.js instead of using `useEvent` on the web, we just return the handling function(also extract the `nativeEvent` in that case). For example project, the package versions have been updated. ## Test code and steps to reproduce Just run the example screens(like DragAndDrop or ChatHeads) Co-authored-by: Jakub Gonet <[email protected]>
I'm getting this "react-native-web": "~0.14.4", I'm using:
|
Ahh sorry, didn't see that the fix happened in Upgrading to |
…oth-slider) may cause [TypeError: Cannot destructure property 'onGestureHandlerStateChange' of 'this.ref.props' as it is undefined](software-mansion/react-native-gesture-handler#1164)
This is a bug in react native web. I want to detect double tap using TapGestureHandler. It works perfectly fine in Android and iOS but in Web, I get this error:
Versions
react-native: 0.62.2
react-native-web: 0.13.6
react-native-gesture-handler: 1.7.0
Sample code to generate issue
Just use this component with any component in web.
The text was updated successfully, but these errors were encountered: