react-native-dropdown-picker icon indicating copy to clipboard operation
react-native-dropdown-picker copied to clipboard

^5.4.7-beta.1 - Error: NativeViewGestureHandler must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.

Open sharathbangera6 opened this issue 2 years ago • 3 comments

I am getting following error when i use ^5.4.7-beta.1 Version - NativeViewGestureHandler must be used as a descendant of GestureHandlerRootView. Otherwise, the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.

Can you please import GestureHandlerRootView from react-native-gesture-handler and Add it to the route of your component.

I edit Picker.js and added below code to route of this component and it works. Can you incorporate the same and update ? we will upgrade the package.

<GestureHandlerRootView style={{ flex: 1 }}> ... </GestureHandlerRootView>

sharathbangera6 avatar Oct 19 '23 16:10 sharathbangera6

Yep same issue too, my app is already wrapped in GestureHandlerRootView 🤔

dominictobias avatar Oct 24 '23 14:10 dominictobias

This issue happens when yarn doesn't properly dedupe deps. Run npm ls react-native-gesture-handler

I had react-native-gesture-handler duped in react-native-dropdown-picker even though all my deps were using the same version and yarn claims it de-dupes.

In the end I just deleted yarn.lock and node_modules and reinstalled and de-duping worked properly

myproject
├─┬ @react-navigation/[email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped // before it wasn't deduped
└── [email protected]

dominictobias avatar Oct 24 '23 15:10 dominictobias

Just remove node_modules and yarn.lock, and yarn install. Problem is solved

MussadiqAli avatar May 06 '24 13:05 MussadiqAli