# How to Drag and Drop in React

DevFeed: [How to Drag and Drop in React](<https://devfeed.tech/articles/how-to-drag-and-drop-in-react-18958.md>)

Original publisher: [Read original article](<https://www.robinwieruch.de/react-drag-and-drop/>)

Author: Robin Wieruch

Published: 2024-10-10T04:56:46Z

Content type: tutorial

Language: en

Sources: [Robin Wieruch](<https://devfeed.tech/sources/robin-wieruch.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>)

Tags: [drag-and-drop](<https://devfeed.tech/tags/drag-and-drop.md>), [example](<https://devfeed.tech/tags/example.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [library](<https://devfeed.tech/tags/library.md>), [react](<https://devfeed.tech/tags/react.md>), [react-component](<https://devfeed.tech/tags/react-component.md>), [react-dnd](<https://devfeed.tech/tags/react-dnd.md>), [react-drag-and-drop](<https://devfeed.tech/tags/react-drag-and-drop.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>), [vertical](<https://devfeed.tech/tags/vertical.md>)

## AI overview

The tutorial builds a reusable React drag-and-drop list with @hello-pangea/dnd. It initializes a stateful item list with useState, wraps the list in DragDropContext, and uses Droppable as a render-prop component for the drop zone; its supplied properties must be applied to the surrounding list element. A drag-end callback receives source and destination details: if there is no destination, the operation is abandoned; otherwise, source and destination indexes are used to reorder the stateful list. Each item is rendered with Draggable, which requires an index prop for tracking and a stable key. The excerpt does not show the completed Draggable setup or later customizations.

## Source excerpt

A tutorial about using Drag and Drop in React by example for a vertical list (later horizontal list) with @hello-pangea/dnd as DnD library ...