I am trying to use this Component ("react-beautiful-dnd") and this error appear. It is something with the code or with the dependencies.
Thank you.
Error:
index.js:1452 TypeError: Object(...) is not a function
at useMemoOne (use-memo-one.esm.js:18)
at DragDropContext (react-beautiful-dnd.esm.js:5546)
at mountIndeterminateComponent (react-dom.development.js:15167)
at beginWork (react-dom.development.js:15692)
at performUnitOfWork (react-dom.development.js:18750)
at workLoop (react-dom.development.js:18791)
at renderRoot (react-dom.development.js:18876)
at performWorkOnRoot (react-dom.development.js:19812)
at performWork (react-dom.development.js:19722)
at performSyncWork (react-dom.development.js:19696)
at requestWork (react-dom.development.js:19551)
at scheduleWork (react-dom.development.js:19358)
at Object.enqueueSetState (react-dom.development.js:12789)
at PrivateRoute.push../node_modules/react/cjs/react.development.js.Component.setState (react.development.js:354)
at Object.next (App.js:117)
at index.cjs.js:1508
at index.cjs.js:1626
"dependencies": {
"@material-ui/core": "^4.1.0",
"@material-ui/icons": "^4.1.0",
"@material-ui/styles": "^4.1.0",
"downshift": "^3.2.0",
"firebase": "^5.5.8",
"history": "^4.7.2",
"lodash": "^4.17.11",
"npm": "^6.9.0",
"prop-types": "^15.6.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-autosuggest": "^9.4.2",
"react-awesome-modal": "^2.0.5",
"react-beautiful-dnd": "^10.0.4",
"react-device-detect": "^1.6.1",
"react-firebase": "^2.2.8",
"react-ga": "^2.5.7",
"react-md-spinner": "^0.3.0",
"react-redux": "^6.0.1",
"react-responsive-carousel": "^3.1.49",
"react-router": "^4.3.1",
"react-router-dom": "next",
"react-scripts": "2.1.5",
"react-select": "^2.4.3",
"react-swipeable-views": "^0.13.3",
"react-tooltip": "^3.9.0",
"reactstrap": "^6.5.0",
"redux": "^4.0.1",
"styled-components": "^4.1.3"
}
Hi there!
Thanks for raising this issue. Can you please create a standalone example on codesandbox.io using our boilerplate: https://codesandbox.io/s/k260nyxq9v
Without a standalone example, we will not be able to action this one
Cheers!
The same error. In the sandbox it works fine
I think It might be because of the version of some dependencies. I have them in the question, which one you think might be?
Solved for my case. In my app react version was 16.7 (without hooks) so I had to rollback to react-beautiful-dnd 10.1.1. This did the trick.
Have a look at your console. We require react > 16. rbd should have been complaining at you for not meeting the peer dep requirement
"peerDependencies": {
"react": "^16.8.5"
},
Solved for my case. In my app react version was 16.7 (without hooks) so I had to rollback to react-beautiful-dnd 10.1.1. This did the trick.
Solved my issue as well. Thank you @zag2art
Solved for my case. In my app react version was 16.7 (without hooks) so I had to rollback to react-beautiful-dnd 10.1.1. This did the trick.
Solve my problem, too!Thx a lot! But what's difference between 10.1.1 and the latest one which casuses this issue?This is very confuse me, hope u can tell us...orz @alexreardon
Most helpful comment
Solved for my case. In my app react version was 16.7 (without hooks) so I had to rollback to react-beautiful-dnd 10.1.1. This did the trick.