import React, { useState } from "react"; import { SelectableList, Draggable, DraggableProvider } from "../../"; // Initial items to be dragged const data = [ { id: "1", text: "Task 1", }, { id: "2", text: "Task 2", }, { id: "3", text: "Task 3", }, { id: "4", text: "Task 4", }, ]; const DraggableDefault = (props) => { const [initialState, setInitialState] = useState(data); return ( <> setInitialState(items)} > {initialState.map(({ id, text }) => ( ))} ); }; export default DraggableDefault;