I'm struggling to create a requirement for my React-Native application where I am having a blank dropbox(on dropping a flatlist item it should convert into a draggable flatlist) and a draggable flatlist from where I have to drag and drop to the blank dropbox and vice-versa.
The items in both the flatlists should have a right side menu on click to which should show a option to move to the item to the other flatlist.
I know it's a very common scenario but as I'm quite new to React-Native so I am struggling to get any library or create the same by myself.
I'm using React-Native with Redux and Typescript
I'm using react-native-draggable-flatlist for Flatlist(https://github.com/computerjazz/react-native-draggable-flatlist), please let me know if there are any better option
I have created the minimal example with
react-native-gesture-handler
let me know if it helps :Here is the snack if you want to test!
More performant way using declarative api from
react-native-reanimated
For swaping list items and their indexes use
Code
component