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

Function App

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

moveFunction · 0.90
indexFunction · 0.70

Tested by

no test coverage detected