fluid-dnd
Version:
An agnostic drag and drop library to sort all kind of lists. With current support for vue, react and svelte
3 lines (2 loc) • 301 B
TypeScript
import { Config } from '../core';
export default function useDragAndDrop<T, E extends HTMLElement>(items: T[], config?: Config<T>): readonly [import("react").RefObject<E>, T[], import("react").Dispatch<import("react").SetStateAction<T[]>>, (index: number, value: T) => void, (index: number) => void];