I am trying to use react-beautiful-dnd for drag n drop sorting of a list but my elements are not draggable and I get Unable to find draggable with id: X
. I have cross-check my code with examples in docs but unable to find what I need to fix. I am using constant id
for key
and draggableId
prop.
Code:CodeSandBox
Edit 1: I expected the code to be able to drag and rearrange items but will return to their initial position as state update is not implemented
Just ran into the same problem. Try disabling React's Strict Mode. That fixed it for me. https://reactjs.org/docs/strict-mode.html
There's an open issue for this with react-beautiful-dnd here https://github.com/atlassian/react-beautiful-dnd/issues/2350. Hopefully compatibility with strict mode will be fixed soon. Until then removing strict mode works around the issue.