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.
Solves #140
While it works very well with LunatiqueCoder/expo-drax-example (which is forked from: nuclearpasta/react-native-drax-example) , we managed to reproduce in production this particular issue: software-mansion/react-native-gesture-handler#2674.
As described in the above link and also in #165, this happens when there are a lot of
GestureDetectors
from the newgesture-handler
API. Reducing the number ofGestureDetectors
(orDraxViews
in our case) will make the issue less annoying or even very hard to reproduce.I believe this should stay as a draft until we manage to fix it OR we can try to have a
useLegacyGestureHandler
prop.While I also had to add some type guards, here are the actual changes:
Use our handler functions with the new Gestures API: https://github.com/nuclearpasta/react-native-drax/pull/166/files#diff-b52f91dca567c4972b2329b1112b2e2e9ab2613eeaf5330dff68ef1bfae2eb93R756-R801
Replace
LongPressGestureHandler
withGestureDetector
: https://github.com/nuclearpasta/react-native-drax/pull/166/files#diff-ca36f9b9f717cdebf5e5026d070d332a5013a2d79129fdd8bbf91cf189a360daR341-R600