MCPcopy
hub / github.com/clauderic/dnd-kit / App

Function App

apps/templates/react-sortable/src/App.jsx:16–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14}
15
16export default function App() {
17 const [items, setItems] = useState([1, 2, 3, 4]);
18
19 return (
20 <DragDropProvider
21 onDragEnd={(event) => {
22 setItems((items) => move(items, event));
23 }}
24 >
25 <ul className="list">
26 {items.map((id, index) => (
27 <SortableItem key={id} id={id} index={index} />
28 ))}
29 </ul>
30 </DragDropProvider>
31 );
32}

Callers

nothing calls this directly

Calls 1

moveFunction · 0.90

Tested by

no test coverage detected