1

I'm looking to implement a list in my React Native app that allows users to rearrange items by dragging them up and down, effectively changing the order of the list. I've tried several npm packages, but none seem to work or are outdated for the latest versions. Can anyone suggest a way to create a draggable list in React Native with Expo Go? I've tried different approaches, but haven't been able to figure it out. Any help would be appreciated. Thanks!

  • There's plenty of articles and tutorials about that. This is one of them: https://blog.logrocket.com/react-native-draggable-flatlist/ – Stefano Ortisi Apr 13 '23 at 09:37
  • Thank you for your comment. As I mentioned before, and if you read through their GitHub issues at https://github.com/computerjazz/react-native-draggable-flatlist/issues, you'll see that the library is outdated and not functioning properly. That's why I'm exploring alternative solutions. – Felix Development Apr 13 '23 at 11:15

1 Answers1

1

You can try react-native-draglist : https://github.com/fivecar/react-native-draglist

This package is a basic version of react-native-draggable-flatlist without dependencies on anything except react and react-native. Specifically, it is deliberately built to avoid react-native-reanimated and its hanging/crashing issues.

It is limited in the following ways:

  • It does not animate as smoothly (though it does useNativeDriver)
  • It only handles vertical lists (though adding horizontal in a PR won't be hard)
jwallet
  • 248
  • 3
  • 7