frontend-collective / react-sortable-tree

Drag-and-drop sortable component for nested data and hierarchies
https://frontend-collective.github.io/react-sortable-tree/
MIT License
4.9k stars 897 forks source link

React dnd upgrade #927

Open rana-bazil opened 2 years ago

rana-bazil commented 2 years ago

react-dnd has been upgraded to v16.0.0 and that is causing issues with the current code base

NickEmpetvee commented 2 years ago

@rana-bazil are you seeing something like the below?

ERROR in ./node_modules/react-dnd/dist/core/DndProvider.js 28:0-48
Module not found: Error: Can't resolve 'react/jsx-runtime' in '/Users/xyz/Desktop/xxxxxxxxx/node_modules/react-dnd/dist/core'
Did you mean 'jsx-runtime.js'?

If so, in the react-dnd issues area see this issue for a solution. It's partly in Chinese but Google Translate changes the answer to this:

In the react-dnd/core/DndProvider.js file, change import { jsx as _jsx } from "react/jsx-runtime"; to import { jsx as _jsx } from "react/jsx-runtime.js";

danroberts commented 2 years ago

In addition, {DragSource} is no longer part of the exported api in v16.0.0.