Replies: 2 comments
-
|
Have the same issue |
Beta Was this translation helpful? Give feedback.
0 replies
-
We are aware of the issues with compiler. One of the improvements in Gesture Handler 3 will be support for React Compiler. You can try beta version and let us know if it works for you 😅 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone!
I'm running into an issue with the new React Compiler and RNGH gesture callbacks that I wanted to discuss with the community.
The Issue
The React Compiler is throwing warnings on gesture callback handlers like
.onStart(),.onEnd(), etc., claiming that refs are being accessed during render:Error:
The Problem
The React Compiler doesn't seem to understand that:
onPressin aTouchableOpacityworksCurrent Workaround
I can suppress the warning with
// eslint-disable-next-line react-compiler/react-compiler, but this causes the compiler to skip the entire file, which defeats the purpose of using the React Compiler for future React optimizations.Questions for the Community
Has anyone else encountered this? How are you handling RNGH + React Compiler compatibility?
Is the team aware of this issue? Are there plans to address it in future versions?
Alternative approaches? Is there a way to structure gesture handlers that plays better with the React Compiler?
Beta Was this translation helpful? Give feedback.
All reactions