react-native-dropdown-picker
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.
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>
Yep same issue too, my app is already wrapped in GestureHandlerRootView 🤔
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]
Just remove node_modules and yarn.lock, and yarn install. Problem is solved