skip to Main Content

I have two flatlist consist of 5 and 10 items, i want to drag 1 item from first flatlist to second and vice verse , i have searched for many library but havent found any one yet.

2

Answers


  1. You can easily achieve this thing with react-native-draggable-flatlist

    import DraggableFlatList, {
      ScaleDecorator,
    } from "react-native-draggable-flatlist";
    
    <DraggableFlatList
          data={data}
          onDragEnd={({ data }) => setData(data)}
          keyExtractor={(item) => item.key}
          renderItem={renderItem}
        />
    

    Hope it will you!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search