dnd-multi-backend: TypeError: manager.getActions is not a function with latest react-dnd version (9.3.2 at time of writing)
Reproduction: https://codesandbox.io/s/react-dnd-example-11-ow923
Potentially related to the removal of DragDropContext (replaced by DndProvider)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 19 (9 by maintainers)
I completely forgot to link that, my bad: https://github.com/LouisBrunner/dnd-multi-backend/tree/next/packages/react-dnd-multi-backend#migrating-from-3xx
react-dnd 9.x.xintroducesDnDProviderwhich creates the backend and provides arguments (context, manager and extra args), thus the previous syntax of callingTouchBackendwith arguments and passing it toreact-dnddoesn’t work anymore.You will have to transform your pipeline from
to
Just to keep you up to date, I am preparing a new version (probably 4.0.0) on the
nextbranch that will fix this issue by supporting the new>= 9.0.0react-dnd API.However react-dnd non-esm builds are completely broken (wrong entry point, wrong imports…) so it will have to wait until that is fixed. In the meantime, I will update
3.x.xto forbid usage of newer react-dnd.@chuckdries Thanks for the report, I will take a look as soon as possible!
As it seems like this issue is now fixed by
4.0.0-0, I will publish it onlatestas4.0.0, thanks to all of you for your patience!Hi,
EDIT: nevermind that was some npm bug, I just restarted it and it works perfectly.
I had the same problem, so I installed all the dependencies :
used the same import and custom pipeline as above but with
preview: trueand the sameDndProvider.Then this error appeared :
Could you help me understand why ? Thank you
The
nextbranch is currently using the CommonJS version ofreact-dnd, thus you will need to usereact-dnd-cjs,dnd-core-cjs,react-dnd-html5-backend-cjsandreact-dnd-touch-backend-cjsin yourdependenciesfor now (seepeerDependenciesofreact-dnd-multi-backendandreact-dnd-preview).