Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unfortunately a bug has been observed where the screen freezes when pressing / entering and returning to the overview. This bug is only on iOS.
I have tried everything to debug it. The conclusion is related software-mansion/react-native-reanimated#3331. The new gesture component GestureDetector do not handle on mount very well.
I had three possible solutions:
Reintroduce old working gesture handling solution
Combine old and new RNGH solution and add a prop useLatestRNGH to determine which one to use
Debug and figure out what is the problem
I started with solution 3, which is currently in place (previous version). I removed the defined 'worklet' approach which causes a bad warning as RNGH gets confused on what thread to use. But it worked. The debugging is pure guessing as there is no proper debugging information for worklets when working with the UI thread.
I tried to do solution 2 but it introduces ALOT of extra code and make readability and complexity ALOT more difficult.
*** The only viable solution is 1: remove latest RNGH2.0 and go back to reanimated useAnimatedGestureHandler and wait for RNGH to fix their GestureDetector ***