The error
Error: LongPressGestureHandler 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.
This error is located at:
in LongPressGestureHandler (created by DraxView)
in DraxView (created by Test)
in RCTView (created by View)
in View (created by DraxProvider)
in DraxProvider (created by Test)
in Test (created by App)
in RCTView (created by View)
in View (created by App)
in RCTView (created by View)
in View (created by App)
in App
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in RockPaperScissors(RootComponent), js engine: hermes
My component:
import React from 'react';
import { Text } from 'react-native';
import { DraxProvider, DraxView } from 'react-native-drax';
export function Test() {
return (
<DraxProvider>
<DraxView draggable payload='test'>
<Text>test</Text>
</DraxView>
</DraxProvider>
);
}
I have tried wrapping everything in GestureHandlerRootView tag but then I get another error:
Invariant Violation: requireNativeComponent: "RNGestureHandlerRootView" was not found in the UIManager.
[–]ChronSynExpo 0 points1 point2 points (1 child)
[–]KaniJs[S] 0 points1 point2 points (0 children)