question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: manager.getActions is not a function with latest react-dnd version (9.3.2 at time of writing)

See original GitHub issue

Reproduction: https://codesandbox.io/s/react-dnd-example-11-ow923

Potentially related to the removal of DragDropContext (replaced by DndProvider)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

8reactions
LouisBrunnercommented, Sep 23, 2019

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.x introduces DnDProvider which creates the backend and provides arguments (context, manager and extra args), thus the previous syntax of calling TouchBackend with arguments and passing it to react-dnd doesn’t work anymore.

You will have to transform your pipeline from

...
    {
      backend: TouchBackend({ enableMouseEvents: true }), // Note that you can call your backends with options
      preview: false,
      transition: TouchTransition
    }
...

to

...
    {
      backend: TouchBackend,
      options: {enableMouseEvents: true}, // Note that you can call your backends with options
      preview: false,
      transition: TouchTransition
    }
...
8reactions
LouisBrunnercommented, Jul 25, 2019

Just to keep you up to date, I am preparing a new version (probably 4.0.0) on the next branch that will fix this issue by supporting the new >= 9.0.0 react-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.x to forbid usage of newer react-dnd.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to fix the error (is not a function) in react - Stack Overflow
hello I am learning react and currently I stumble on an error message: (TypeError: newsData.map is not a function) in my browser when...
Read more >
TypeError: manager.getActions is not a function with latest react-dnd ...
TypeError : manager.getActions is not a function with latest react-dnd version (9.3.2 at time of writing). Last Updated on:Wed, 06 Jan 2021 00:46:15...
Read more >
Troubleshooting - React DnD - GitHub Pages
Troubleshooting. This page is dedicated to the problems you might bump into while using React DnD. Could not find the drag and drop...
Read more >
dispatch is not a function' inside of my alert.js action file ...
I am new to using Redux. I have made a reducer and action to have an alert display whenever an item is saved....
Read more >
A Guide to Common React Errors
Error: Objects are not valid as a React child ... If not, you could write a function to generate IDs prior to rendering...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found