Course lesson

Persist List Reordering with react-beautiful-dnd using the onDragEnd Callback

In this lesson will demonstrate how you can persist changes locally that resulted from a drag and drop interaction. To accomplish this, you will implement the onDragEnd callback function that is invoked at the end of every react-beautiful-dnd drag and drop....

Duration
6 min
Access
Pro
Transcript
Available

In this lesson will demonstrate how you can persist changes locally that resulted from a drag and drop interaction.

To accomplish this, you will implement the onDragEnd callback function that is invoked at the end of every react-beautiful-dnd drag and drop. This function receives a result object. We will use the source and destination properties of the result object to update the order of our task list