Thanks so much for making this fantastic video! I was struggling to get dnd working and this video has really helped me understand the process. My columns are now fully drag-and-droppable!
As others have mentioned if you get the "unable to find draggable" error just deactivate strict mode or use hello-pangea instead (uses reac beautiful dndb) that solve the issue for me. Hope it helps
If anyone is watching this and using Next.js and for some reason the package didn't work. It's entirely because of SSR with Next.js, in order to solve that you'd have to override the "DragDropContext", "Droppable", "Draggable" Example: import dynamic from 'next/dynamic' const DragDropContext = dynamic( async () => { const mod = await import('react-beautiful-dnd') return mod.DragDropContext }, { ssr: false } ) const Droppable = dynamic( async () => { const mod = await import('react-beautiful-dnd') return mod.Droppable }, { ssr: false } ) const Draggable = dynamic( async () => { const mod = await import('react-beautiful-dnd') return mod.Draggable }, { ssr: false } ) Now you use these components instead of importing from the package directly. I suggest you place those above in a separate file maybe in like a directory called "src/components/dragAndDrop/index.tsx" and export them.
I keep getting the following error: You are attempting to add or remove a Draggable [id: 828473d6-cbc1-4a13-a461-557b0ed59175]while a drag is occurring. This is only supported for virtual lists.
I have problems, it's showing me Unable to find draggable with id:. :/ , I followed the tutorial and copy and paste the code but the error is still showing me
Nice, but could you kindly show us a new video showing this saving into firebase? 😅 Locally is so much easier but I'm more about a Trello clone which saves your card drags states to Firebase into their proper collections(or docs)..
@@taranveerjohal175 how did you handle server data and positioning ? do your lists/items have position to them ? I can think of sorting them by position while rendering but couldn't wrap my head around how to 'update the position and persist it on db' because If I change the position then every single item's position must also be updated.
@@emreozgun3846 I am using templates for positions in a mongodb atlas cluster table/collection . My list from API reference the templates and I can update the templates too