react-beautiful-dnd 警告及解決方式匯總

react-beautiful-dnd 警告及解決方式匯總

react-beautiful-dnd Unable to find draggable with id: 1

image
{list.map((item, index) => (
  <DraggableItem route={item} index={index} />
))}
<Draggable
  draggableId={data.id.toString()}
  index={index}
>
    ...
</Draggable>

解決方法:

刪除 <React.StrictMode></React.StrictMode>

placeholder could not be found

Droppable setup issue [droppableId: "test"]:DroppableProvided > placeholder could not be found.Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.

解決方式:

<Droppable></Droppable> 內加上 {provided.placeholder}

留言

目前沒有留言。

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *