Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Drag and Drop in React with React Query and React-Beautiful-Dnd

Dave Gray via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This course shows how to add drag-and-drop ordering to a React Query todo list with react-beautiful-dnd. It also demonstrates preserving the reordered list through CRUD operations and page refreshes using intermediate state, useEffect, and localStorage.

Syllabus

Intro
Welcome
What We're Adding
Starter Code
Updating & Adding Dependencies
json-server
Starting the project
Initial DnD imports
DragDropContext
Bracket Pair Colorization
Droppable
Parent section
Assigning content
Mapping todos
Draggable
Droppable placeholder
React 18 Strict Mode issue & solution
Creating intermediate state
onDragEnd destination
Persisting DnD order with useEffect & localStorage
Update handleOnDragEnd
handleDelete
Testing CRUD Ops and refresh / reload

Taught by

Dave Gray

Reviews

Start your review of Drag and Drop in React with React Query and React-Beautiful-Dnd

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.