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.

Can't use without importing react-dnd and requiring react as a peer dependency

See original GitHub issue

Hi,

This is some great code, and I’d like to make it work with a new front-end to dnd-core that I wrote for Angular. That project is at https://cormacrelf.github.io/angular-skyhook/ & https://github.com/cormacrelf/angular-skyhook/. Edit: it’s called angular-skyhook now.

Backends in react-dnd are not supposed to care about what code provides them with DOM elements to latch onto, and this is true of MultiBackend, except that some some react-specific helpers are bundled into the package. I wouldn’t expect that you rebuild those helpers for any other frontend – the preview component would have to be quite different, and it would mess up your build scripts enormously – but I would appreciate splitting the package into agnostic and react-specific parts. A major version bump would prevent accidental upgrades. The agnostic part should depend only on dnd-core.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
LouisBrunnercommented, Jun 29, 2018

Great! I updated the documentation on the next branch, it will get merged once I get feedback on some React bug fixes.

1reaction
LouisBrunnercommented, Dec 28, 2017

Hi,

That’s a great idea! I will look into that soon. Depending on the difficulty, MultiBackend could provide helpers for other frontends (maybe based on pull-requests?).

Read more comments on GitHub >

github_iconTop Results From Across the Web

require() of ES Module from react-dnd-html5-backend ... - GitHub
react -dnd-html5-backend is a peer dependency. The newest version is 16 which is ESM only, thus using require() is not allowed.
Read more >
create-react-app dependency version issues with React 18
Could not resolve dependency: npm ERR! peer react@"<18.0.0" from @testing-library/react@12.1.5 npm ERR! node_modules/@testing-library/react ...
Read more >
Invalid Hook Call Warning - React
If these react imports resolve to two different exports objects, you will see this warning. This may happen if you accidentally end up...
Read more >
react-sortable-hoc - npm
Start using react-sortable-hoc in your project by running `npm i ... Using an ES6 transpiler like Babel import {SortableContainer, ...
Read more >
How do I fix these errors on npm install command ... - Reddit
One of your dependencies ( react-beautiful-dnd ) says that it needs React version 16.8.5, 17.0.0 or a higher minor release to run.
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