Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR Error: GestureDetector 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. #536

Open
Jidahan opened this issue May 16, 2024 · 2 comments

Comments

@Jidahan
Copy link

Jidahan commented May 16, 2024

After introduction, the page directly reports an error

Platform & Dependencies
Please list any applicable dependencies in addition to those below (react-navigation etc).

  • react-native-draggable-flatlist version: ^4.0.1
  • Platform: ios
  • React Native or Expo version: "0.72.7",
  • Reanimated version: ~3.3.0
  • React Native Gesture Handler version: ~2.16.0

Additional context
Add any other context about the problem here.

@Jidahan
Copy link
Author

Jidahan commented May 16, 2024

resolved! use GestureHandlerRootView include DraggableFlatList

 import {GestureHandlerRootView} from 'react-native-gesture-handler';

  <GestureHandlerRootView style={{flex: 1}}>
    <DraggableFlatList
      style={{backgroundColor: '#f5f5f5', width: '100%'}}
      data={data}
      keyExtractor={item => item.id}
      renderItem={({item, drag, isActive}) => (
        <Text>123</Text>
      )}
    />
  </GestureHandlerRootView>

@HarshDev2
Copy link

Thanks @Jidahan, I had the same issue, and this solved it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants